3 ms·
The size and complexity of your app is an important factor here. If only one view in your app needs to touch the state in a certain way — say, fetching some dat
by turdnagel 9y ago
The size and complexity of your app is an important factor here. If only one view in your app needs to touch the state in a certain way — say, fetching some data from an API and updating a view — then it might make sense to manage that state in your view. But if multiple components in various parts of your app are making similar kinds of calls, it makes sense to manage it centrally, with a file or set of files that can handle common actions.