How to disable react native warning message at the bottom

前端 未结 6 1153
予麋鹿
予麋鹿 2021-01-12 04:16

I\'m working on a react-native IOS app, and this app sometimes will raise a Warning message \"setState(...) Can only update a mounted or mounting component. ...\", I underst

6条回答
  •  不要未来只要你来
    2021-01-12 05:06

    I edited my App.js file and added this:

    console.ignoredYellowBox = ['Warning: Can only update a mounted', '-[EXCamera updateFocusDepth'];
    

    You can provide an array of things you want to ignore. Simply provide a prefix of ones you want to ignore, no '*' or other wildcard required.

提交回复
热议问题