I'm trying to create a React Redux application by extending the Redux Minimal boilerplate: https://redux-minimal.js.org/
This boiler-plate currently manages a list of users. I'd like to extend it to have another page that manages a 2nd type of item (in my example it is sports players), to help with my understanding. Does anyone have an example of a simple extension to this boilerplate, or can advise on the general approach of how to extend it in this manner?
Actions I've taken so far:
- api - create a second API file of players.js, identical to users.js but returning an array of players
- reducers/ - added a second reducer of players.js identical to users.js but with variable and constant names changed throughout
- reducers/index.js added import for my players reducer. Added players: players at end of reducer after users: users, [wasn't sure about this]
- sagas/ - added a second saga of players, which calls the players api above and with variable and constant names changed throughout
- sagas/index.js - added import for players sagas and added corresponding sagas to function
- router - added route for my player component
- components/common - added copies of the various User... files with Player... files with variable names changed throughout
- components/App.js - fairly unsure about this one. I've added a props.dispatch to call my PLAYERS_FETCH_LIST in the componentWillMount() as I assume they need to be loaded in at application start, but I was unsure if this should only be being called when the player component route is accessed, and added to the state at this point. Added players to the mapStateToProps to be returned.
- components/Player.js - new page which calls the PlayerList component