Creating Actions

Learn about creating functions that create all the actions in our store.

Actions initiate changes to our store state. In this section, we are going to create functions that create all the actions in our store. We will start by understanding all the actions that will be required in our store.

Understanding the actions in the store

The three processes that will interact with the store are as follows:

  • Fetching and rendering the unanswered questions on the home page

  • Fetching and rendering the question being viewed on the question page

  • Searching questions and showing the matches on the search page

Each process comprises the following steps:

  1. When the process starts, the store’s loading state is set to true. ...