How to upgrade to React 16.3
Closed this issue · 8 comments
I am trying to build iOS app with this package. but I am getting error.
o.a.forwardRef is not a function.
Any help is appreciated!
What version of react and react-native are you using?
@CharlesStover, thanks for quick reply.
I am using react v16.0.0-alpha.12 and react native v0.46.0.
forwardRef
wasn't supported until 16.3, so you would need to upgrade your version of React to at least that version.
could you possibly share package.json file?
it would be appreciated if you can share some example.
Via command line, yarn add react@^16.3.1
should fix it. If you are not using yarn
, the npm
equivalent would be npm install react@^16.3.1 --save
.
You may need to upgrade react-native
too, but I've had problems with the react-native
package being finicky in the past, so I would only do that if the react
upgrade by itself doesn't work.
Okay, thank you.
You're welcome. If you need more assistance, you are welcome to ask here, but a React Native group may be better equipped to answer your questions regarding the upgrade process.