If you have components that are pretty specific to a certain page -do you usually put them in a component folder within the page folder? Or always separately in the main components folder?
Is up to you how much flexibility you wanna have on your conventions. In my case a component related to a page only, can live inside that page folder. Because moving to the components folders it's actually super easy in case you have to.
For example you could have a folder Home where the Home/index.js exposes the full Home component, and inside there a Home/Clock.js component. If you need to reuse clock, it can be moved to components and you'd only have to update you Home to use the clock in components. It's a cheap refactor
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you have components that are pretty specific to a certain page -do you usually put them in a component folder within the page folder? Or always separately in the main components folder?
Is up to you how much flexibility you wanna have on your conventions. In my case a component related to a page only, can live inside that page folder. Because moving to the components folders it's actually super easy in case you have to.
For example you could have a folder
Home
where theHome/index.js
exposes the full Home component, and inside there aHome/Clock.js
component. If you need to reuse clock, it can be moved to components and you'd only have to update you Home to use the clock in components. It's a cheap refactor