N
N
Newbie Ivanovich2019-08-05 10:18:07
React Native
Newbie Ivanovich, 2019-08-05 10:18:07

How and where to load all the necessary data in a mobile application written in React-native?

How to download all the necessary data before authorization and after authorization?
now I load the data in each screen (componentDidmount) and save it in redux store or asyncstorage

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-08-05
@NovichokIvanovich

The data necessary for initialization can be loaded in an async action:

const store = configureStore();

store.dispatch(init());

const App: React.FC = () => (
  <Provider store={store}>
    <Navigation />
  </Provider>
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question