magicismight / react-native-root-toast

react native toast like component, pure javascript solution
MIT License
2.05k stars 404 forks source link

Please update the following components: Toast #168

Closed gameveloster closed 10 months ago

gameveloster commented 1 year ago

I tried using react-native-root-toast in my RN expo app and I see this warning below about unsafe usages.

 WARN  Warning: componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move code with side effects to componentDidMount, and set initial state in the constructor.
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Toast
 WARN  Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Toast

Should react-native-root-toast make the necessary updates?

My package.json includes

    "expo": "^48.0.7",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.6",
    "react-native-root-toast": "^3.4.1",
yachtwave commented 11 months ago

+1 on this. Just hit this wall.

jr00n commented 11 months ago

+1 same here

nickpagee commented 10 months ago

+1

mgscreativa commented 10 months ago

+1

sunnylqm commented 10 months ago

closed https://github.com/magicismight/react-native-root-toast/commit/4315711ecbf87504bee69be2acaf41cecde52224