Looking to utilize Async Storage in a Mobile Application, but having a hard time figuring out how to pass state as props through Navigation after lifting it up to the "root" file.
Here is an example I found that would work independent of Navigation:
const [ "state", "setState" ] = useState(state);
...
return (
<Container>
<Home state={state} setState={setState}/>
</Container>
)
Here is what i've tried with Navigation:
const [ "state", "setState" ] = useState(state);
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name ='Home' >
{props => <Home state={state} setState={setState}/>}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
If needed to provide more for context, will do - just let me know. thanks in advance