skip to Main Content

Can I make changes?

I'd like to implement the equivalent to the javascript localStorage in my React Native app. But I'm unsure how to set. To function how I want it to, I would like the localStorage to be stored every time the app…

VIEW QUESTION

How can I rewrite this?

Considering such code below: const [list, setList] = useState([]); const [curPage, setCurPage] = useState(0); const fetchItem = useCallback(async ()=>{ const data = await callAPI(); // data is an object setList(prev => [...prev, data]); },[]); useEffect(()=>{ if(list.length - 1 < curPage)…

VIEW QUESTION
Back To Top
Search