unload other list when unmounting
This commit is contained in:
parent
b3951a67b2
commit
6f4513f571
|
|
@ -72,7 +72,7 @@ export default function Other({theme, selCat, others, setOthers, setSelCat}:any)
|
|||
}
|
||||
|
||||
useEffect(() => {sortOthers()}, [others]);
|
||||
useEffect(()=>{return()=>{setSelCat({id:0})}},[])
|
||||
useEffect(()=>{return()=>{setSelCat({id:0});setOthers([])}},[])
|
||||
|
||||
return (
|
||||
<View style={style(theme).container}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue