DEV Community

Discussion on: How is My first ReactJs Book-store app?

Collapse
 
emma profile image
Emma Goto 🍙 • Edited

Nice job keeping at it for one month! I took a quick look at your code (I hope you don't mind) and I agree with you that the list of state/props is overwhelming in the App.js file. I think one way you could improve this is to think about whether the code/state needs to live in that file, or if it could live in any one of your sub-components.

e.g. I can see that the disabledStatus state and emptyDescription() function could be moved down to live in HomePage.js. Moving where the state is defined also saves you from having to pass it down through all your components as props.

Collapse
 
shubham2270 profile image
Shubham Kumar

Thanks for suggestions i'll look into it 😊