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

Added react-is to validate the proptype for Route's component. #6417

Merged
merged 4 commits into from Oct 26, 2018

Conversation

frehner
Copy link
Contributor

@frehner frehner commented Oct 23, 2018

Added react-is to validate the proptype for Route's component.

Removed a couple of outdated TODOs that dealt with __DEV__

The rest of the changes were done just from an npm install command

React-is does add a tiny bit of size ( https://bundlephobia.com/result?p=react-is@16.5.2 ) as noted by the snapshots, but it seems like the best (and official) way to support the check.

Adds the changes and feedback found in #6327 while also removing a duplicated test

Removed a couple of outdated TODOs that dealt with __DEV__

The rest of the changes were done just from an npm install command

React-is does add a tiny bit of size ( https://bundlephobia.com/result?p=react-is@16.5.2 ) as noted by the snapshots, but it seems like the best (and official) way to support the check.
Copy link
Member

@mjackson mjackson left a comment

Choose a reason for hiding this comment

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

I'm not sure why you removed the TODOs in react-router-native, but the other changes look good.

@@ -20,8 +20,6 @@ NativeRouter.defaultProps = {
}
};

const __DEV__ = true; // TODO
Copy link
Member

Choose a reason for hiding this comment

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

We don't actually have a build for react-router-native yet, so we still need this.

Copy link
Contributor Author

@frehner frehner Oct 25, 2018

Choose a reason for hiding this comment

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

Whoops, my bad. I thought I saw something but I guess I'm wrong 😊 Will fix.

@@ -41,8 +41,6 @@ class Link extends React.Component {
}
}

const __DEV__ = true; // TODO
Copy link
Member

Choose a reason for hiding this comment

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

We don't actually have a build for react-router-native yet, so we still need this.

@frehner
Copy link
Contributor Author

frehner commented Oct 25, 2018

Updated. Sorry about that! 😊

@mjackson mjackson merged commit 8ecdbd9 into remix-run:master Oct 26, 2018
@mjackson
Copy link
Member

Excellent. Thanks, @frehner! :)

@rajiff
Copy link

rajiff commented Oct 26, 2018

Any Idea when this will be available over npm? waiting for this in hope of fix for this issue#172

@frehner frehner deleted the fix-routes-component-proptype branch October 26, 2018 20:33
@mjackson
Copy link
Member

Planning on shipping 4.4.0-beta.5 tomorrow with this in it.

@frehner frehner mentioned this pull request Nov 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 29, 2018
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.

None yet

4 participants