Home / Function/ Parent() — astro Function Reference

Parent() — astro Function Reference

Architecture documentation for the Parent() function in Parent.jsx from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  01643d5a_628f_4039_01b4_ec29ee2fe26e["Parent()"]
  99f2a415_a8ac_2fcd_3c26_0bda7a735796["Parent.jsx"]
  01643d5a_628f_4039_01b4_ec29ee2fe26e -->|defined in| 99f2a415_a8ac_2fcd_3c26_0bda7a735796
  style 01643d5a_628f_4039_01b4_ec29ee2fe26e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/fixtures/astro-slots-nested/src/components/react/Parent.jsx lines 3–19

export default function Parent({ children }) {
  const [show, setShow] = useState(false);

  useEffect(() => {
    console.log('mount');
  }, []);

  return (
    <>
      <p>
        <input type="checkbox" value={show} onChange={() => setShow(!show)} />
        Toggle show (true should show "Inner")
      </p>
      {show ? children : 'Nothing'}
    </>
  );
}

Subdomains

Frequently Asked Questions

What does Parent() do?
Parent() is a function in the astro codebase, defined in packages/astro/test/fixtures/astro-slots-nested/src/components/react/Parent.jsx.
Where is Parent() defined?
Parent() is defined in packages/astro/test/fixtures/astro-slots-nested/src/components/react/Parent.jsx at line 3.

Analyze Your Own Codebase

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

Try Supermodel Free