Why you should avoid using the effect>setState pattern in React
Let's say you have an initialItems array that you fetch from an API and set it in state like this:
const [items, setItems] = useState<T[]>(initialItems)
You may instinctively realize, initialItems is
aldrichdev.hashnode.dev3 min read