react-native
react-native copied to clipboard
[Android]call getCurrentActivity().findViewById method return null result
javascript: findNodeHandle(this.refs.myView) //return 128 Call in the Java code getCurrentActivity().findViewById(128) return null Is what I call the wrong? RN 0.31.0
Help me to deal with this problem
test js call setTimeout delay 1000. call successful.
@289420843 reopen issue please, I have same bug, even onLayout it crashes
Fixed – https://github.com/facebook/react-native/issues/2206#issuecomment-319621435
This saved me. The timeout delay solved my problem. Why it's can't find native view after componentDIdMount ?