Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Initial state is better included in the individual reducers #3

Open
rvvergara opened this issue May 18, 2019 · 0 comments
Open

Initial state is better included in the individual reducers #3

rvvergara opened this issue May 18, 2019 · 0 comments

Comments

@rvvergara
Copy link

Hi @arielcamus,

In Milestone 4 , the initialState object to be included as individual 'initial states' in the respective reducers instead of having them in src/index.js. For instance in the book reducer we can have an initial state:

const initialState = [{<book1 object>}, {<book2 object>}]

This makes a cleaner index.js.

Also we should probably include here a step to put store creation in its own file (i.e, in a src/store/index.js file as it is a common practice in redux projects (at least in those projects I previously encountered). This helps the student to have a clearer way of structuring redux projects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant