I wish there was a good resource for this.
You’ve probably already seen these:
It’s been a while since I’ve tried researching good examples, but it was very difficult to find the right example projects that fit my needs. Most are either too simple or too complex. Also, I prefer plain JS (I don’t use TypeScript) and hooks though reading TypeScript and class-based components isn’t too hard.
Let me know if you find any good ones!
My main suggestion is to not over-organize your code. I see a lot of react app structures with too much boilerplate for beginners. Start with create-react-app and start with a simple folder structure like this in /src:
Then add folders as needed as your app gets bigger. My medium-sized app currently has the following /src
/assets (for icons, images, etc.)
/components (everything goes here, no subfolders. currently have about 50 components which for me is quite manageable with no further organization needed)
/config (for Firebase and redux)
/dnd (for react-dnd)
/redux (I put action types and action creators in one file (e.g. databaseActions.js) and reducers in another file (e.g. databaseReducer.js))
/routes (react-router, public and private routes)
/styles (using bootstrap scss import)
But that structure evolved over time where I created new folders once I felt like things were getting messy and needed organization.
Also, I name my components like so:
All of this for me will probably change if/when my project gets more complex.
Hope that helps!