Home / File/ Counter.jsx — astro Source File

Counter.jsx — astro Source File

Architecture documentation for Counter.jsx, a javascript file in the astro codebase. 1 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  fccdbd05_3743_eb10_60cd_0d5e73b1517e["Counter.jsx"]
  58645bbc_6680_4e2a_38e9_3e4f34edbed5["vue"]
  fccdbd05_3743_eb10_60cd_0d5e73b1517e --> 58645bbc_6680_4e2a_38e9_3e4f34edbed5
  style fccdbd05_3743_eb10_60cd_0d5e73b1517e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { defineComponent, ref } from 'vue';

export default defineComponent({
  props: {
    start: {
      type: String,
      required: true
    },
    stepSize: {
      type: String,
      default: "1"
    }
  },
  setup(props) {
    const count = ref(parseInt(props.start))
    const stepSize = ref(parseInt(props.stepSize))
    const add = () => (count.value = count.value + stepSize.value);
    const subtract = () => (count.value = count.value - stepSize.value);
    return () => (
      <div class="counter">
        <h1><slot /></h1>
        <button onClick={subtract}>-</button>
        <pre>{count.value}</pre>
        <button onClick={add}>+</button>
      </div>
    )
  },
})

Subdomains

Functions

Dependencies

  • vue

Frequently Asked Questions

What does Counter.jsx do?
Counter.jsx is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain, ReactIntegration subdomain.
What functions are defined in Counter.jsx?
Counter.jsx defines 1 function(s): default.setup.
What does Counter.jsx depend on?
Counter.jsx imports 1 module(s): vue.
Where is Counter.jsx in the architecture?
Counter.jsx is located at packages/astro/test/fixtures/vue-jsx/src/components/Counter.jsx (domain: IntegrationAdapters, subdomain: ReactIntegration, directory: packages/astro/test/fixtures/vue-jsx/src/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free