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

Support for React Router 4 #123

Open
boldfacedesign opened this issue Aug 13, 2017 · 2 comments
Open

Support for React Router 4 #123

boldfacedesign opened this issue Aug 13, 2017 · 2 comments

Comments

@boldfacedesign
Copy link

boldfacedesign commented Aug 13, 2017

React Router 4 relies on React context to work. You can no longer simply render Link components etc. For unit testing we now have to wrap things with a <MemoryRouter> or <StaticRouter> (see https://reacttraining.com/react-router/core/guides/testing)

As those docs suggest there is possibly another workaround for this my stubbing/mocking the context.

@ondrejbartas
Copy link
Contributor

Yes you can wrap whole <MemoryRouter><BlueKit/></MemoryRouter> and then your links starts to work 👍

@ondrejbartas
Copy link
Contributor

It is same approach when you need to work with connected components in Redux ecosystem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants