Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Incompatibility with react > 16 #129

Open
samouss opened this issue Apr 7, 2017 · 8 comments
Open

Incompatibility with react > 16 #129

samouss opened this issue Apr 7, 2017 · 8 comments

Comments

@samouss
Copy link

samouss commented Apr 7, 2017

Hello,

The latest release of React Native use the v16.0.0-alpha.6 of React.
In this version the React team has deprecated and remove a lots of addons package, including:

  • react-addons-pure-render-mixin
  • react-addons-create-fragment
  • react-addons-update

facebook/react#9207

Due to this BC the package throw an error when the test are running:

module.js:472
    throw err;
    ^

Error: Cannot find module 'react/lib/ReactComponentWithPureRenderMixin'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)

We should drop the import of this addons and create a new version for support this new release of React Native.

Any ideas?

Thanks!

@RealOrangeOne
Copy link
Owner

Wow, supprised they're depricating all those. Had a quick look through the issue you linked, but it doesnt sound like it's as simple as Facebook arent supporting these anymore. Is there a way we can change the require path / method to keep using these libraries? If not, we'll have to look into trying to remove the dependency on these, which sounds interesting.

@RealOrangeOne RealOrangeOne changed the title Incompatibility with the 0.43 Incompatibility with react > 16 Apr 7, 2017
@samouss
Copy link
Author

samouss commented Apr 7, 2017

I try to remove the useless dependency in my project and it works.
Do you want a PR ?

@RealOrangeOne
Copy link
Owner

Yes, please! I'm surprised it's so simple, I was expecting much worse!

@pziemkowski
Copy link

Any update on this issue?

@JonnyBurger
Copy link

I appreciate you working on this!
If you, like me, desperately want to upgrade, I published @samouss's branch as an npm package: https://www.npmjs.com/package/@jonny/react-native-mock

Install and update references in babel config and requires from react-native-mock to @jonny/react-native-mock.

No update / maintenance and I will unpublish the package when the main repository has been updated for a while.

@jeaye
Copy link

jeaye commented Dec 8, 2017

Thank you, @JonnyBurger! That does the trick, for now. This really needs to be merged.

@JAStanton
Copy link

@JonnyBurger can you put up a github repo with your source for the react-native-mock fork? It would be nice to contribute to it :P it seems to be the only path forward for this repo

@JonnyBurger
Copy link

@JAStanton I uploaded my fork here: https://github.com/JonnyBurger/react-native-mock

It has some other changes, like requiring react-native@^0.55. If it causes problems for others, I would be happy to take PRs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants