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

Warn on invalid middlewares #3717

Merged
merged 1 commit into from
Aug 16, 2016
Merged

Warn on invalid middlewares #3717

merged 1 commit into from
Aug 16, 2016

Conversation

taion
Copy link
Contributor

@taion taion commented Aug 9, 2016

Right now, if you pass in a value with properties that is not a valid React Router middleware, we just silently ignore it. This leads to really confusing things happening like relay-tools/react-router-relay#189.

I don't think anybody's intentionally passing in empty objects to applyRouterMiddleware, so this should be a nice DX convenience.

@taion
Copy link
Contributor Author

taion commented Aug 9, 2016

@reactjs/routing How do we feel about the current middleware API? We're well overdue to add some sort of docs, assuming we like it.

@taion
Copy link
Contributor Author

taion commented Aug 15, 2016

Is this okay to merge?

@timdorr
Copy link
Member

timdorr commented Aug 16, 2016

I'm not a user of the middleware personally, so I don't feel confident to comment on the API's design.

As for the PR, LGTM!

@timdorr timdorr merged commit 8aa5434 into master Aug 16, 2016
@timdorr timdorr deleted the warn-invalid-middleware branch August 16, 2016 01:26
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants