In the initial stages, it may seem tempting to rely only on React Context to fulfill your data storage needs. However, as your application’s store structures become more complex and the task of maintaining and developing it grows intimidating, you might find that React Context alone falls short. It becomes evident that an alternative solution is needed.
Initially, you might question whether it’s possible not to use data storage within the app and rely exclusively on data fetched from endpoints. However, this approach may not be possible, especially when certain interactive components heavily rely on stored data. Without this stored data, interactive components could trigger an excessive number of endpoint calls, potentially leading to a significant slowdown of your site or even causing it to freeze.
If you can avoid using the state manager/storing data on the frontend or reduce its size, it’s better to do so, as all of it comes with a cost.
From this moment, your critical concern becomes the selection and implementation of the right state manager. You find yourself at a crossroads, searching for a solution that can reduce issues of component re-renders, simplify the state structure, speed up development and maintenance of your application’s states.