Tell us which versions you are using:
There should no such warning message say Warning: BackAndroid is deprecated. Please use BackHandler instead.
there is warning message say Warning: BackAndroid is deprecated. Please use BackHandler instead. and caused by code in react-native-router-flux/src/Router.js
Same here:
Tell us which versions you are using:
Have any good news for this issue?
@kesha-antonov has already created a PR for this: https://github.com/aksonov/react-native-router-flux/pull/1819
so am I,I guess the react-native 0.44 has conflict with react-native-router-flux,for i saw a demo used r-n-r-f with 0.38 version of the react-native run well.
0.42version, rectify
Same issue here. Also, getting an additional warning:
View.propTypes has been deprecated and will be removed in a future version of ReactNative. Use ViewPropTypes instead.
react-native-router-flux v3.38.0 (v3.38.1 still has the Dimension error)
react-native v0.44.0
react 16.0.0-alpha.6
Still got the problem on 3.39.1 with RN 0.43.4.
Hope it will be fixed soon !
Still got the problem.
react-native-router-flux: 3.39.1
react-native: 0.44
react: 16.0.0-alpha.6
Still getting the warning.
I have fixed that manually,
Edit /node_modules/react-native-router-flux/src/Router.js
Find and replace each "BackAndroid" with "BackHandler" with the following lines:
Final updated code should be like this:
import { BackHandler } from 'react-native';
...
...
componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', this.handleBackAndroid);
}
...
...
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.handleBackAndroid);
}
I hope this will help you 👍
Most helpful comment
I have fixed that manually,
Edit
/node_modules/react-native-router-flux/src/Router.jsFind and replace each "BackAndroid" with "BackHandler" with the following lines:
Final updated code should be like this:
import { BackHandler } from 'react-native';...
...
componentDidMount() { BackHandler.addEventListener('hardwareBackPress', this.handleBackAndroid); }...
...
componentWillUnmount() { BackHandler.removeEventListener('hardwareBackPress', this.handleBackAndroid); }I hope this will help you 👍