This repository demonstrates issue with TextInput and react-native-screens.
For reproduce run:
yarn install && yarn start
and yarn android
in second tab.
What's going on:
- Open
HomeScreen
withTextInput
. - Redirect to
SecondScreen
. - Redirect back to
HomeScreen
and in the same time reset value ofTextInput
.
Expected behavior: input value should be changed.
Actual behavior: input value is not changed.
More information:
- If you comment line
useScreens();
then everything will work. - Check console logs. You can see that
handleOnChangeText
once more more than it should (it's called'Initial value'
string).