Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: __RouterContext is no longer being exported in v6 #8453

Closed
geoff-harper opened this issue Dec 7, 2021 · 1 comment
Closed

[Bug]: __RouterContext is no longer being exported in v6 #8453

geoff-harper opened this issue Dec 7, 2021 · 1 comment
Labels

Comments

@geoff-harper
Copy link

What version of React Router are you using?

6.0.2

Steps to Reproduce

Attempt to import __RouterContext

Expected Behavior

In v5.x this was being exported for external use. I am using two react renderers in the same project and previously I was able to pass the context object down into the second renderer (see https://github.com/pmndrs/drei#usecontextbridge). This enabled navigating within the three.js tree. Redux and styled-components allow this sort of usage as well. I'm hoping this is an oversight instead of a hard technical limitation and that it can be re-exported in an upcoming version. This is a big blocker for me and I'm locked into v5 indefinitely if it isn't changed

Actual Behavior

Failure to import.

@timdorr
Copy link
Member

timdorr commented Dec 7, 2021

This was never a supported API. react-router-dom no longer uses this and actually uses only public APIs from react-router.

What you're likely going to need is #8264. In that issue are some potential workarounds for you, so you can use a common history instance.

@timdorr timdorr closed this as completed Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants