4 ms·
> It's covered in the documentation now, explicitly: > Do not use async effects. Use suspense. The linked documentation does not mention the word "suspense".
by nh2 4y ago
> It's covered in the documentation now, explicitly:
> Do not use async effects. Use suspense.
The linked documentation does not mention the word "suspense".
Do you have a link that combines these two topics?
Instead the React docs explain a workaround that leads to completely different network request behaviour across development and production:
> In development, you will see two fetches in the Network tab.
> In production, there will only be one request.
The proposed solution in the docs now:
> useSomeDataLibrary()
without saying what that "some data library" could be.