diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/react/lib/ReactLink.js | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/react/lib/ReactLink.js')
-rw-r--r-- | node_modules/react/lib/ReactLink.js | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/node_modules/react/lib/ReactLink.js b/node_modules/react/lib/ReactLink.js index b0e88225b..1ae9ee33f 100644 --- a/node_modules/react/lib/ReactLink.js +++ b/node_modules/react/lib/ReactLink.js @@ -33,8 +33,6 @@ * consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin. */ -var React = require('./React'); - /** * Deprecated: An an easy way to express two-way binding with React. * See https://facebook.github.io/react/docs/two-way-binding-helpers.html @@ -42,29 +40,10 @@ var React = require('./React'); * @param {*} value current value of the link * @param {function} requestChange callback to request a change */ + function ReactLink(value, requestChange) { this.value = value; this.requestChange = requestChange; } -/** - * Creates a PropType that enforces the ReactLink API and optionally checks the - * type of the value being passed inside the link. Example: - * - * MyComponent.propTypes = { - * tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number) - * } - */ -function createLinkTypeChecker(linkType) { - var shapes = { - value: linkType === undefined ? React.PropTypes.any.isRequired : linkType.isRequired, - requestChange: React.PropTypes.func.isRequired - }; - return React.PropTypes.shape(shapes); -} - -ReactLink.PropTypes = { - link: createLinkTypeChecker -}; - module.exports = ReactLink;
\ No newline at end of file |