Working with useState Redux toolkit

Basic useState example. The initoal value (20) was passed from the server but the component itself (Counter application) was created from the client side.

Basic Redux example. The initial value (20) was passed from server The initial value (100) was retrieved from an endpoint (rest api) from an asyncThunk function call; once retrieved, state is sets with that value.

What I've learned:


retrieving value from /api/counter