You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a React / Redux web application. In the beginning of the project, I had a very good understanding of my application state. But, as the code base grows, I tend to put more and more attributes to the application state through reducers. The problem here is, if a new person joining my project, he may not have a clear knowledge about all the attributes that are already there in the state.
Right now, I am just using a commented out Object in a file called state.js to describe all the attributes in the state.
The question is: Is there better way to document the structure of my application state so that it is easy to make sense? What approach do you guys use?
The text was updated successfully, but these errors were encountered:
Depending on your structure, I think wp-calypso does a great job on that. They have selectors, reducers, constants, actions and a README.md file that holds most of the documentation, all of them in same dir. Look below!
state
product
reducer.js
selectors.js
actions.js
constants.js
README.md
You can always use a Redux devtool, like either redux-devtools or redux-devtools-extension to browse the state tree. You can also just JSON.stringify the state at any point (I suggest putting the store on window to make it accessible through your console) to see what it looks like.
I am working on a React / Redux web application. In the beginning of the project, I had a very good understanding of my application state. But, as the code base grows, I tend to put more and more attributes to the application state through reducers. The problem here is, if a new person joining my project, he may not have a clear knowledge about all the attributes that are already there in the state.
Right now, I am just using a commented out Object in a file called
state.js
to describe all the attributes in the state.The question is: Is there better way to document the structure of my application state so that it is easy to make sense? What approach do you guys use?
The text was updated successfully, but these errors were encountered: