Redux Road is a text-based adventure game that has taught me the core concepts of Redux, a state management tool that's used with any JavaScript framework or library.
The player can choose from various actions including "gather", "travel", "tippedWagon", "sell", "buy", and "theft". Each action changes the state, which contains the player's inventory (supplies and cash), distance travelled, and time on the road.
- Defining initial state with its properties
- Redux reducers for managing state (with switch statement cases for every action)
- Using action.type and action.payload to trigger state updates based on user input
Please note that in each project, the first commit is always the starter code provided by Codecademy.