Warning: isMounted(…) is deprecated in plain Javascript Classes

前端 未结 11 1033
庸人自扰
庸人自扰 2020-12-29 03:20

I am implementing 2 screens using react-navigation. But I got the warning below while navigating to the second page:

Warning: isMounted(...) is deprec

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 03:27

    This is what i did for this problem for the time being:

    step 1:Tap on the warning

    step 2: In the yellow window click on the stack trace option in top right

    step 3: Find the path where the warning has occured,ex:C:\Users\username\projectname\node_modules\react\cjs\react.development.js

    step 4: Open the path in editor

    step 5: Find the key word isMounted under the deprecated api's and delete the deprecated function and warning related under it.

    step 6: Save and reload your app!!thats it

提交回复
热议问题