vision-camera-code-scanner
vision-camera-code-scanner copied to clipboard
Warning: Can't perform a React state update on an unmounted component.
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function. in Scanner (at SceneView.tsx:132)
As stated in the warning message did you remove all listener in a useEffect hook or in the componentWillUnmount function? This errer usually happen when you have a setTimeout or a fetch/axios call to a remote resource and the response arrives after your component is unmounted.
https://dev.to/collegewap/react-prevent-state-updates-on-unmounted-components-2j4d