You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
If you don't mind waiting for your data to load before you transition, you can use onEnter to fetch data. But your page will feel sluggish because the router doesn't attempt to update state until all onEnter hooks are finished (so it knows if it needs to redirect or not).
They suggest it shouldn't be used, but in our case since we are using it for server side render, does it matter that the page feels sluggish? What do you think?
Do they suggest any replacement for onEnter on pure client side? or there's other suggested approaches to handle async data loading (on the client) in the new router?
As to the server rendering, I'm 100% with you here.
As react-router's author say,
onEnter
should only use for redirect, see: remix-run/react-router#1389 (comment)Any ideas here?
The text was updated successfully, but these errors were encountered: