Nativebase: RN 0.38.0 ReactNativePropRegistry path changed

Created on 24 Nov 2016  路  20Comments  路  Source: GeekyAnts/NativeBase

"react-native": "^0.38.0",

import ReactNativePropRegistry from 'react/lib/ReactNativePropRegistry';
should be changed to
import ReactNativePropRegistry from 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry';
in:

native-base\Components\Widgets\Button.js
native-base\Utils\computeProps.js
react-native-easy-grid\Utils\computeProps.js

Most helpful comment

Better to change to

import ReactNativePropRegistry from 'ReactNativePropRegistry';

All 20 comments

Better to change to

import ReactNativePropRegistry from 'ReactNativePropRegistry';

@alexicum I think the issue is still there, can we reopen it?

Yes!
And that is why:

Requiring module 'ReactNativePropRegistry' by name is only supported for debugging purposes and will BREAK IN PRODUCTION!

Is it mean that for RN 0.38 it should be:
import ReactNativePropRegistry from 'react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry';
?

319

307

I believe this is a private API and should not be relied on. Can native-base switch to a public API instead?

I have created a pull request for this.

Fixed with v0.5.16

Fixed with latest release 0.5.18

@priezz curious, where should i change this
'import ReactNativePropRegistry from 'ReactNativePropRegistry';
since im not even using it anywhere. thanks

@thundenilla, it is about the NativeBase sources. 'Components/Widgets/Button.js' and 'Utils/computeProps.js'. However, the paths are already fixed in the recent version, so it is just enough to update the package.

Anyway... Can someone explain why to use private React/RN API?

@thundenilla You need not 'import ReactNativePropRegistry from 'ReactNativePropRegistry';, since the issue has been fixed.
Have proper version of NativeBase with RN

Is not resolve in the version release 0.5.18.

"dependencies": {
    "color": "^0.11.4",
    "moment": "^2.16.0",
    "native-base": "0.5.18",
    "node-qs-serialization": "0.0.2",
    "numeral": "^1.5.3",
    "react": "15.3.2",
    "react-native": "0.37.0"
....

And

--------- beginning of main
12-03 19:29:29.534 10933 11110 E ReactNativeJS: Requiring unknown module "react-native/Libraries/Renderer/src/renderers/native/ReactNativePropRegistry".If you are sure the module is there, try restarting the packager or running "npm install".
12-03 19:29:29.603 10933 11110 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)

@alejonext Have proper version of NativeBase with RN

  • For RN < 0.38 then you should go for NB < 0.5.16
  • For RN >= 0.38, NB 0.5.18 is compatible

We will soon document this

@SupriyaKalghatgi

`
"native-base": "^0.5.14",
"react": "15.3.2",
"react-native": "0.34.0",
"react-native-code-push": "1.14.6-beta",
"react-native-easy-grid": "^0.1.6",

`

And still getting the error, any idea why? I tried updating NB but then CardSwipping Crashed, so I need to stick with 0.5.14 for a while.

@SupriyaKalghatgi I've this issue with these config:
"dependencies": {
"color": "^0.11.3",
"lodash": "^4.13.1",
"moment": "^2.13.0",
"native-base": "2.0.13",
"react": "15.4.2",
"react-native": "0.42.3",
"react-native-code-push": "^1.17.2-beta",
"react-native-easy-grid": "0.1.8",
"react-native-modalbox": "^1.3.4",
"react-native-navigation-redux-helpers": "^0.5.0",
"react-redux": "^5.0.2",
"redux": "^3.6.0",
"redux-persist": "^4.0.0",
"redux-thunk": "^2.2.0",
"remote-redux-devtools": "^0.5.0",
"remote-redux-devtools-on-debugger": "^0.7.0",
"socketcluster-client": "^5.3.0"
}

I'm running the starter kit. I tried to fix it but I haven't found fortune so far.

This issue happen again with react-native 0.46.1. The path has change to "react-native/Libraries/Renderer/shims/ReactNativePropRegistry".
My config:
{
"native-base": "^2.1.4",
"react": "16.0.0-alpha.12",
"react-native": "0.46.1",
}
The original commit from react-native that cause it happen: https://github.com/facebook/react-native/commit/94c565a2c4650b2d6d8d0f10f53f168ea610a3e3

Trying 2.2.1 ...

also seeing this issue with lastest RN / Expo 0.18 (confirm it's working by using appropriate NativeBase version for Expo 18 = 2.2.0)

307

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agersoncgps picture agersoncgps  路  3Comments

natashache picture natashache  路  3Comments

Cotel picture Cotel  路  3Comments

Landerson352 picture Landerson352  路  3Comments

bsiddiqui picture bsiddiqui  路  3Comments