Support react-router 6 (#275) - #282
Conversation
OKTA-676780 Support react-router 6
|
Hi @jaredperreault-okta , is this PR going through your tests before being merged for a new okta-react version? |
|
@Spartan-Hex-Shadow Yes. This will become a new major version release |
Wonderful, thanks! |
|
@jaredperreault-okta any E.T.A on release? |
|
@Spartan-Hex-Shadow I apologize for the delay on this, however I am trying to determine what the best course of action for this SDK is. I'm curious, have you experimented with the use of |
Hi Jarred. We have not. Our app is heavily based around components and we have began the process of addressing technical debt by upgrading to the latest versions of our third party packages but cannot do so for some as this package does not support react router 6. The SecureOutlet approach would work very well for us and would be a seamless code transition from SecureRoute So we would personally prefer that but ultimately recognize it is not up to us to decide if that happens or not. |
OKTA-721854 merge master into dev7
|
Hi @jaredperreault-okta , any updates? |
|
@Spartan-Hex-Shadow Some other tasks have taken my attention. I'll be revisiting this soon |
|
@jaredperreault-okta Much appreciate, thank you so much. |
|
@jaredperreault-okta any updates? |
|
Any update on react-router 6 support? |
SecureRoute and SecureOutlet are v5- and v6-shaped code respectively, but both previously lived in the same top-level @okta/okta-react bundle/module graph. That meant react-router-dom symbols referenced by either component were a latent bundler/type risk for every consumer, regardless of which router version (or neither) they used - this already caused a real production build break (#178/#187, patched in #210/#213). Move SecureRoute to @okta/okta-react/react-router-5 and SecureOutlet to @okta/okta-react/react-router-6, each built as its own bundle, so unused router-version code never enters a consumer's build graph. Ports the design from the unmerged #282 (dev7) onto current master's tooling. BREAKING CHANGE: SecureRoute and SecureOutlet are no longer exported from @okta/okta-react. Import SecureRoute from @okta/okta-react/react-router-5 and SecureOutlet from @okta/okta-react/react-router-6 instead. Minimum supported Node version is now 12.17.0.
OKTA-676780 Support react-router 6
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Reviewers