how to add function call into JSX
I have a component setup like
where
where
GameRoot is a context provider that sets up a game state and stores a list of card ids for each zone. For testing purposes I want to load some initial cards into the state. Can I put a function call to my setState function in the JSX? I've tried a couple things that felt intuitive to me but am not figuring it out. I could pass some initial state into the GameRoot component with props but that isn't how I want to implement it in the end so I would rather not