unload other list when unmounting

This commit is contained in:
moist-webDev 2023-06-08 21:13:36 -04:00
parent b3951a67b2
commit 6f4513f571
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ export default function Other({theme, selCat, others, setOthers, setSelCat}:any)
} }
useEffect(() => {sortOthers()}, [others]); useEffect(() => {sortOthers()}, [others]);
useEffect(()=>{return()=>{setSelCat({id:0})}},[]) useEffect(()=>{return()=>{setSelCat({id:0});setOthers([])}},[])
return ( return (
<View style={style(theme).container}> <View style={style(theme).container}>