Posts are loaded from a mock data source. Error and loading states are handled.
The data fetching logic is separated from the PostsZustandPageResults component and moved inside the usePostsController custom hook. This helps with the readability of the React component and separation of concerns.
Closes #7 Simple Zustand usage example.
New page /posts-zustand, shows a list of posts.
Posts are loaded from a mock data source. Error and loading states are handled.
The data fetching logic is separated from the
PostsZustandPageResults
component and moved inside theusePostsController
custom hook. This helps with the readability of the React component and separation of concerns.