I upgraded ReactNative from 0.2.1 to 0.26.3 and then ran the project on both Android and iOS. It worked fine in iOS but in Android, it throw out an error :
Undefined is not a function(React.defalut2.findNodehandle)
Also tried {import ReactNative, {} from 'react-native';}
and ReactNative.findNodeHandle(component)
; it did not work neither.
You can now import the function directly:
import {
...
findNodeHandle,
...
} from 'react-native';
And use without class:
findNodeHandle(ref)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With