-
-
Save reime005/3bb076567f9231cfdc5eda7327f01763 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.tsx | |
const App = () => { | |
const [store, setStore] = React.useState<null | Store>(null); | |
React.useEffect(() => { | |
setupStore().then(setStore); | |
}, []); | |
if (!store) { | |
return null; // or loading screen | |
} | |
return ( | |
<RootStoreProvider value={store}> | |
<SafeAreaView style={{ flex: 1 }}> | |
<View> | |
<Example /> | |
</View> | |
</SafeAreaView> | |
</RootStoreProvider> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment