Skip to content

Commit

Permalink
Added react-is to validate the proptype for Route's component. (#6417)
Browse files Browse the repository at this point in the history
* 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.

* Revert removal of __DEV__

* Updated the error message to be a little more clear about which prop is invalid.

* Realized it wasn't saying what I wanted, so I just reverted it.
  • Loading branch information
frehner authored and mjackson committed Oct 26, 2018
1 parent 64b4335 commit 8ecdbd9
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 289 deletions.
144 changes: 0 additions & 144 deletions packages/react-router-config/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions packages/react-router-dom/.size-snapshot.json
@@ -1,8 +1,8 @@
{
"esm/react-router-dom.js": {
"bundled": 7935,
"minified": 4844,
"gzipped": 1607,
"bundled": 7968,
"minified": 4870,
"gzipped": 1613,
"treeshaked": {
"rollup": {
"code": 1240,
Expand All @@ -14,13 +14,13 @@
}
},
"umd/react-router-dom.js": {
"bundled": 161801,
"minified": 58038,
"gzipped": 16043
"bundled": 171152,
"minified": 61992,
"gzipped": 16916
},
"umd/react-router-dom.min.js": {
"bundled": 101990,
"minified": 36745,
"gzipped": 10247
"bundled": 106635,
"minified": 38911,
"gzipped": 11286
}
}

0 comments on commit 8ecdbd9

Please sign in to comment.