W
W
webe2018-10-29 01:15:15
React
webe, 2018-10-29 01:15:15

Where to make requests to the server in MobX?

Please help me figure it out, I used to work with redax, now I installed MobX.
A number of questions arose question
1) if I want to execute an Ajax request, I just need to create @actioninside my store and call fetch there, how to configure a synchronous action and an asynchronous one? Should I use runInAction ?
2) how to deal with isLoading fields, how to organize them correctly, write them manually, or is there any generally accepted approach inside mobx?
3) How to get access inside the action of one store to the data of another store?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question