Closed iddan closed 7 years ago
We don't have plans to do this. React elements are already more or less plain objects, but we intentionally add a symbol $$typeof
which allows us to verify that it did not come directly from a JSON blob:
https://github.com/facebook/react/issues/3473
This fixes a security hole.
React should not be a dev dependency for small modules it takes too much time to use. More than that if PropTypes will go native now no imports at all except for helpers!!!
React itself is a quite small package. In the future we might split out PropTypes and createClass. If you want, you can use babel-plugin-react-inline-elements which makes it so JSX has no dependency on the React package in prod.
Problem
Solution
Add to ReactDOM.render() and AppRegistry.registerComponent():
and
will become
Why