This repository has been archived by the owner on Dec 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react): add react-compat to deal with the warnings
React@15.5.0 introduced deprecation warnings for a few things and they're really annoying. So this will help prevent those warnings from logging for people using this package.
- Loading branch information
Kent C. Dodds
committed
Apr 7, 2017
1 parent
47c26e0
commit 6d3a324
Showing
6 changed files
with
305 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint import/no-mutable-exports:0, import/prefer-default-export:0 */ | ||
import React from 'react' | ||
|
||
let PropTypes | ||
|
||
/* istanbul ignore next */ | ||
if (React.version.slice(0, 4) === '15.5') { | ||
PropTypes = require('prop-types') | ||
/* istanbul ignore next */ | ||
} else { | ||
PropTypes = React.PropTypes | ||
} | ||
|
||
export {PropTypes} |
Oops, something went wrong.