ComponentWillMount warning

前端 未结 5 1049
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 18:20

I am creating a layout with inside. I am getting to this scene from another. So at the beginning another layout is rendered. After i go to the second scene (with TextInput

5条回答
  •  耶瑟儿~
    2021-01-12 18:56

    Yes, because the componentWillMount and componentWillReceiveProps getting deprecated soon in React. I suggest you to use componentDidMount instead of componentWillMount.

    But you will still get those yellow box warnings because react-native is still using those for the internal components like Image, TouchableOpacity and a lot of other components. We need to wait for a new update to get rid of those warnings. Don't worry, Happy coding.

提交回复
热议问题