React 16 Support
junosuarez opened this issue · comments
Currently this is blocked on an upstream dependency, react-native-web
- they're tracking this at necolas/react-native-web#364
When trying to run against react@16.0.0-beta.5, it looks like:
Error: Cannot find module 'react-dom/lib/EventPluginHub'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/-/Code/zendesk/protoloop-4/node_modules/react-native-web/dist/modules/injectResponderEventPlugin/index.js:1:83)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
The upstream dependency can be fixed using this alias., but react-primitives itself seems to be using old-style React.createClass
calls which don't work in React 16.
TypeError: React.createClass is not a function
node_modules/react-primitives/lib/modules/Touchable.js:77
74 |
75 |
76 | // eslint-disable-next-line react/prefer-es6-class
> 77 | return React.createClass({
78 | displayName:'Touchable',
79 | propTypes:{
80 | accessible:PropTypes.bool,
Any suggestions for how to overcome this?
react-primitives should change to use create-react-class
, i think.
@js-n I have upgraded to 0.4.4, but the problem still persists. I'm using the {StyleSheet} from "react-primitives".
I get the original error message as reported by OP.
We are not using the latest version of react-native-web
(0.2.0). We are still using "react-native-web": "0.0.x",
.