Closed RusAlex closed 9 years ago
The state
changes many times because when the request starts there's a setState
. There's another setState
when the request ends. This allows you to render spinners and other things while the request is being done.
You can always set silent: true
on as a fetch option to override this behaviour.
Ok I understand the idea.
Thanks for fast answering. Will try using your project further.
Thank you for using this lib. Feel free to ask anything :+1:
I've simple React.Component and collection relation with your software.
I initialize empty collection, then try to fetch in in
And your lib change state 3 times because two events fired in collection: request, reset, sync.
Sure I can do it like this:
But please consider something, not to change state during collection fetch call so many times.
Or Am I doing something wrong ?