Closed Jakebluhm closed 1 year ago
Read and write should be done in useEffect() becuase they are side effects (basically a async callback for when a state variable chage)
First few sections of this article explain this clearly: https://dmitripavlutin.com/react-useeffect-explanation/
Read and write should be done in useEffect() becuase they are side effects (basically a async callback for when a state variable chage)
First few sections of this article explain this clearly: https://dmitripavlutin.com/react-useeffect-explanation/