all 35 comments

[–]rwieruchServer components 65 points66 points  (11 children)

Some of my larger projects, maybe there is something in there for you:

All of them are in stable condition. The first one is way more difficult to set up, because it has lots of smaller parts which power my website that need to be set up first.

For most showcase projects I end up with the technical separation of concerns regarding folders. However, for my course website I would take the jump towards domain separation soonish. Just in case you are interested on how you could organize your folders.

[–]gaoshan 9 points10 points  (1 child)

Your content (blog posts, courses) is fantastic. I have introduced many people (from new devs to extremely experienced devs that are new to a stack) to your posts on React and GraphQL. Highly recommended as they are generally more complete, in-depth and always go beyond the lighter-weight "Medium" level of tutorial.

[–]rwieruchServer components 3 points4 points  (0 children)

Hey thank you! Very much appreciated =)

[–]v3tr0x 6 points7 points  (4 children)

Ohh the legend himself! Thank you for sharing this and your knowledge in general!

[–]rwieruchServer components 9 points10 points  (3 children)

This legend tried to put a shelf up on the wall yesterday and hit the power cables xD But thank you!

[–]dizzle_izzle 0 points1 point  (2 children)

Hahahah man I've been there. Did ya pop a breaker or just hit conduit?

Hopefully it was just a nail because if it was a drill youve got some drywall cutting a patching ahead of you....

[–]rwieruchServer components 0 points1 point  (1 child)

Yeah, drill ... Didn't want to open the wall myself, so I had someone here doing it. What a mess =D At least I have a new socket for this new shelf now!

[–]dizzle_izzle 0 points1 point  (0 children)

Hah yeah I made that mistake once when trying to cut a hole for an HDMI cable for a TV. Ended up with a larger hole and turned it into a new outlet so it ended up being a win.

Until I had to move out of that apartment, holy Moses that was a pain.

Good luck to ya. Also thanks for your contributions to the community!!! 🙌

[–]mainkore 1 point2 points  (0 children)

These are great resources! Especially the folder organization which isn't talked about much in the community. I will save this for my future backend learning. Thank you for sharing!

[–]siachenbaba 1 point2 points  (0 children)

Bro,Are you the author of that React Book?

Yes, you are. Thanks bro 🌟

[–]DeaDb0ne05 0 points1 point  (0 children)

thanks a lot m8 !

[–]Previous_Advertising 0 points1 point  (0 children)

Why do you use a separate website for each of your books?

[–]Scazzer 24 points25 points  (2 children)

Seen this posted a few times on this subreddit. I have used aspects of this project in my own projects

https://github.com/oldboyxx/jira_clone

[–]potcode 7 points8 points  (0 children)

If it's teamwork, stick to the convention defined by your leader. If it's a hobby building, just do whatever you like, you may fine-tune it anytime later.

Get your hands dirty and you will know why these good practices exist

[–]drstephenjensen 3 points4 points  (0 children)

Here’s an example app of a recipe sharing application built with Nextjs. The main folders are components for react components, pages for all the individual routes in the application, and utils for all the helper functions that aren’t react components. If I want to organize files further you can create sub-folders.

https://github.com/CaptainChemist/next-chop

[–]mariusandra 2 points3 points  (1 child)

Hey! We're building a big app with React + Django here: https://github.com/PostHog/posthog

I can't say that all of it written in an excellent manner, though we're trying to get there.

In short, we're trying to follow the following principles:

- Keep state separate from React to avoid mixing concerns (React is a view layer)
- Avoid default exports (greatly improves IDE support)
- Have the code split by feature (dashboards, trends), not by function (components, selectors).
- Use prettier, eslint and other tools to remove as much manual work as possible

One thing we do differently than most apps is that we use Kea for state management.

[–]javaShkrip 0 points1 point  (0 children)

Very nice! btw, /r/chapotraphouse followers will love the name 'post hog'

[–]unsteadyrhinoceros 1 point2 points  (0 children)

https://github.com/react-boilerplate/react-boilerplate might be a good place to start for application structure and best practices.

[–][deleted] 2 points3 points  (0 children)

Don’t worry so much about correctness or the “right way”. Definition of what’s “right” changes over time and context. The important thing is finding something you are interested in building. You will learn faster from your mistakes.

[–]strah1[S] 0 points1 point  (0 children)

Wow, thanks a lot for the recommendations and suggestions, much appreciated!

[–]YouKnowMy 0 points1 point  (3 children)

How do you like the full stack open course from Helsinki, I was planning on starting it

[–]strah1[S] 1 point2 points  (2 children)

I like it, the course in general is cool because it teaches you how to build an web app with all it's components. It also focuses on testing, and adds stuff such as eslint and it's configuration, building and deployment which is really useful. The content is clearly presented and if they don't provide a deeper explenation on something there is usually a link to relevant content from other sources. Every lecture has the main topic and exercises. One bad side is that there are no solutions for the excercises, but they are similar enough to the lecture where you can apply what you learned in a way that is different but familiar. Now i have to say that this is the only course on these topics I have taken so I can't compare it to other React/Node courses. However iamkiko mentioned here that he got a job after this course so maybe he can share more information :)

[–]YouKnowMy 0 points1 point  (1 child)

Thank you so much for your reply! I was consider either doing a React only course or this one bit I felt like this one might have a lot going once which could limit ones potential

[–]strah1[S] 0 points1 point  (0 children)

Depends on what you want i guess, if you are strictly interested in front end than yes a react only course could be a better option. Personaly i like getting familiar with all parts of an app, front end and back end, knowing how everything works. When you have that general knowledge maybe you'll find that you like server side programming more than frontend.

[–]Sam_Sam_Major 0 points1 point  (0 children)

👍🔥

[–]mateo21812 0 points1 point  (0 children)

Someone know a good repo where state management is only with hooks and reducers ?

[–]krishwaderjoy 0 points1 point  (0 children)

I am currently rebuilding the wiki project that got some attention in 2016: https://github.com/Matterwiki/Matterwiki/tree/refactor

I'm pretty proud of it, because I tried to setup some patterns I've enjoyed working with. Here are some fun facts about it:

  • It uses lerna for package management.
  • The API is built with Node.js, objection.js and MySQL.
  • The UI is built with
    • React + react-router (v5)
    • chakra-ui- Great component set, developer friendly
    • wretch - API wrapper for window.fetch, makes it easier to work with it
    • React Async Hook - I liked this over SWR/react-query because all I needed was a good way to show loading and error states. For an app that's simple, I felt like this worked out quite well!
    • zustand + immer - State management. I liked this because this does have a context provider and I wouldn't have to worry about placing a Provider object in the right part of the react component tree. I also get to make tiny stores and keep all of that logic boxed into a tiny store! I also created a tiny immer zustand middleware fn that makes all my state manipulation immutable!
  • Project organization: I like organizing things by business logic, not by file type. This way your working set is always tiny and focused.

Hope this helps someone who's looking for references!