Skip to content

Instantly share code, notes, and snippets.

@vshkl
Last active May 17, 2019 01:48
Show Gist options
  • Select an option

  • Save vshkl/ab903c8ab7186c008b31158bbfff213a to your computer and use it in GitHub Desktop.

Select an option

Save vshkl/ab903c8ab7186c008b31158bbfff213a to your computer and use it in GitHub Desktop.
const registerScreens = ({ store, persistor }, Provider) => {
componentsWithRedux.forEach(({ name, component }) =>
Navigation.registerComponent(
name,
() => props => (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
{React.createElement(component(), props)}
</PersistGate>
</Provider>
),
component,
)
)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment