Components
AnimatePresence
We use the AnimatePresence
<AnimatePresence>
{mounted && (
{children}
)}
</AnimatePresence>
To dynamically render the menu component, you can use the mounted
state that can be retrieved from the store:
const mounted = menu.useState("mounted");
You can learn more about reading state from the store on the Component stores guide.
Follow updates
Join 1,000+ subscribers and receive monthly updates with the latest improvements on Examples.