20 React Tips From A Code Review

Tom Smykowski
9 min readSep 8, 2023

Practicing is a great way of learning. Not everyone however has a mentor that can guide them through the corridors of programming. That’s why today I’ll review some open source hello world React projects and give you some advice how these could be improved.

I’m sure the authors of these projects are already more proficient, and I always really appreciate when someone does their own projects. Also, we have to consider these are just test/initial projects, so it’s not like the authors didn’t know that, but it was not a requirement for them. So great work, and we can also learn a little bit from it!

I’ll be just describing things that can be improved in the projects I’ve found. I’m picking some low-hanging fruits, so join in if you find anything more!

If you like to see the whole code you can use links provided!

⚠️ If you’re not an entry level developer you can skip this article

1. Limit Lines To 100–120 Characters

That’s a really long line. We tend to keep lines in the limit of 100–120 characters, so you can do split view. An IDE with a linter will wrap the code for you, or you can do it on your own.

2. Use Proper Descriptions For Numbers

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

Software Engineer & Tech Editor. Top 2% on StackOverflow, 3mil views on Quora. Won Shattered Pixel Dungeon.

No responses yet