An Interest In:
Web News this Week
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
May 12, 2020 11:53 pm GMT
Original Link: https://dev.to/helderburato/new-react-hook-use-is-mounted-ref-2g21
New React Hook: use-is-mounted-ref
Today I moved a hook that I use to fix the problem of setting the state to an unmounted component and commonly receives the following error:
Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op.
I created the following package:
use-is-mounted-ref
Maybe this can help you to solve this same problem. :)
Feel free to give feedback and share your experience with this topic.
Original Link: https://dev.to/helderburato/new-react-hook-use-is-mounted-ref-2g21
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To