lelandrichardson / react-primitives

Primitive React Interfaces Across Targets
MIT License
3.09k stars 108 forks source link

Should Change to peer dependencies due to react-native-web@0.9.0 BC #120

Closed tkow closed 5 years ago

tkow commented 5 years ago

https://github.com/necolas/react-native-web/releases https://github.com/necolas/react-native-web/commit/506dba933ce69830feaace08aee85c38ce3e59fb

These change broke the compatibility of react < 16.5.1 and ,we couldn't use styled-components/primitives for react-native-web because react-native-primitives use react-native-web @^0.8.3, then I changed this version 0.9.0 and rebuilt, it worked.

So react-native-web no longer have version compatibility, therefore I wonder if it have peer dependency rather than bump version.

lantos1618 commented 5 years ago

Having same issue traced from styled-components/primitives

kevinwolfcr commented 5 years ago

Same issue from '@emotion/primitives. Installing"react-primitives": "tkow/react-primitives#0.7.0"` did worked for me.

qutran commented 5 years ago

I did this workaround:

// TODO hotfix, remove when react-primitives updated react-native-web
import ReactDOM from 'react-dom';
import { injectEventPluginsByName } from 'react-dom/unstable-native-dependencies';
ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.EventPluginHub = {
  injection: { injectEventPluginsByName },
};
evandeininger commented 5 years ago

Same issue here, @tkow's solution worked for me: get in the package.json for react-primatives and bump react-native-web from 0.8.3 to 0.9.0. I had this issue while creating a fresh CRA, React 16.5.2.

Edit: downgrading react-primatives to 0.6.0 also worked, I'll just stay at 0.6.0 till this is bumped.