Hey folks!
Noticed that v6 has this feature check:
https://github.com/ReactTraining/react-router/blob/5bef342de8fe3a7c132edf9cbab1464fda840399/packages/react-router/index.js#L172-L173
While this is exciting and is something we'll definitely want after useTransition is stable, it is really important that the v6 stable release does not ship with this check.
The reason is that useTransition API itself is still not finalized. For example, the config might move into the useTransition call. The tuple item order may change.
If React Router 6 goes stable with React.useTransition || polyfill, the moment we add React.useTransition as a stable API, all existing React Router 6 apps will switch to it automatically. So we would become locked into our current signature.
As a result, we may have to end up renaming useTransition to avoid a breaking change. Similar to Array.prototype.contains -> Array.prototype.includes and global -> globalThis. It would be nice if we could avoid this.
I'm not sure what's the best strategy if you'd like this to work with experimental React releases in the meantime. We can probably figure something out though.
Thank you!
Hey folks!
Noticed that v6 has this feature check:
https://github.com/ReactTraining/react-router/blob/5bef342de8fe3a7c132edf9cbab1464fda840399/packages/react-router/index.js#L172-L173
While this is exciting and is something we'll definitely want after
useTransitionis stable, it is really important that the v6 stable release does not ship with this check.The reason is that
useTransitionAPI itself is still not finalized. For example, the config might move into theuseTransitioncall. The tuple item order may change.If React Router 6 goes stable with
React.useTransition || polyfill, the moment we addReact.useTransitionas a stable API, all existing React Router 6 apps will switch to it automatically. So we would become locked into our current signature.As a result, we may have to end up renaming
useTransitionto avoid a breaking change. Similar toArray.prototype.contains->Array.prototype.includesandglobal->globalThis. It would be nice if we could avoid this.I'm not sure what's the best strategy if you'd like this to work with
experimentalReact releases in the meantime. We can probably figure something out though.Thank you!