What is server state?
We have always had server state in our applications. The main issue was that we tried to tie it in with our client state management solutions. A common example of trying to tie our server state with our client state management solutions is using either Redux Saga or Redux Thunk. Both of them made it easier to do data fetching and store your server state. The main issue starts when we have to deal with some of the challenges server state brings us, but let’s not get ahead of ourselves; you will understand these challenges in the next section.
Now, what is server state, you might be wondering?
Well, as the name says, server state is the type of state that is stored on your server. Here are a couple of things that help identify your server state:
- This state is asynchronous, which means you need to use asynchronous APIs for fetching and updating it.
- It is persisted remotely – most of the time on a database or external place you don...