```jsx import { useScopedState, useScope, Scope, Debug } from 'informed'; import { useRef } from 'react'; import { Form, Input, Code } from 'YourComponents'; const ShowScopedState = () => { /* ---------- This hook gets the scoped state ---------- */ const subState = useScopedState(); /* ------- This hook gets the name of the scope -------- */ const scope = useScope(); /* --------- Use a ref to keep render count :) --------- */ const renders = useRef(0); renders.current += 1; return ( <>
{JSON.stringify(subState, null, 2)}
>
);
};
const Example = () => {
return (
);
};
export default Example;
```