Syncing UI State with the Redux Store
Connect your application UI with the Redux store created with the Redux toolkit.
We'll cover the following...
Introduction
We had numberOfResultsSlice
created in an earlier lesson. Now is the time to put it to good use.
The first thing we want to do is make sure the radio buttons are controlled inputs, i.e., their state is controlled from the external.
Anytime these buttons are clicked, we will save the value in the Redux store, and the selected radio value will always come from the Redux store.
As a reminder, here’s ...