mediumStudy question · answer published in React Native interview questions, so no pointsreact-nativememory-leaks
Listener without effect cleanup
What is the problem with this React Native effect?
useEffect(() => {
const sub = AppState.addEventListener('change', onChange)
}, [])Discussion 0
Join free to post in the discussion.
Related questions
- Why list items need keysMobile App Developer
- Calling setCount twiceMobile App Developer
- Text outside a Text componentMobile App Developer
- Default flexDirection in React NativeMobile App Developer
- What flex: 1 doesMobile App Developer
- Why React Native uses HermesMobile App Developer
- What Metro doesMobile App Developer
- What EAS Build is forMobile App Developer