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

[state-router] Tolerate (but warn) on missing router context #160

Merged
merged 1 commit into from
Sep 8, 2017

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Sep 8, 2017

Any component that relied on the router (e.g. LinkState, IntentLink) would fail hard if they were rendred outside of a <RouterProvider ..> context. Usually you should provide a context, but sometimes it makes sense to not, e.g. when testing. (In my case, testing components that used <StateLink in Storybook)

Also includes a few additional flowtype annotations and minor tweaks.

@bjoerge bjoerge requested a review from rexxars September 8, 2017 13:36
Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bjoerge bjoerge changed the base branch from master to next September 8, 2017 13:48
@bjoerge bjoerge merged commit 42c6983 into next Sep 8, 2017
@bjoerge bjoerge deleted the router/tolerate-missing-context branch September 8, 2017 13:49
@bjoerge bjoerge mentioned this pull request Sep 19, 2017
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

Successfully merging this pull request may close these issues.

2 participants