Two good reasons to use React
If you would ask me about two good reasons why I like to work with React - and use it primarily when doing frontend development - it would really make me think.
No, it was already defined that React would be the weapon of choice and there was already written a lot of code in React. I was just thrown into this React hole and never had the chance to crawl back out. End of story.
If you google "Reasons to use React" you get a lot clever points and different opinions. I even read about advantages of React I never heard about before. I really have to get into this Concurrent Mode stuff ↗.
Anyway, after this research my list of reasons grew bigger and bigger but I noticed despite all this points being true and reasonable arguments there was no real point where I could put my heart into.
So I set all the lists and research stuff aside, closed all the tabs and really started thinking.
And this is what I came up with:
Reason one: popularity
Don't get me wrong. I don't like React because so many cool people use it and if they would switch to the next cool thing I would switch too.
When we talk about the web development world one big thing you always hear is: "have you heard about this new JS framework?". In our field everything is moving so fast and everything changes really quickly.
But if you take a closer look, you will notice that React is here since 2013. That's like VERY OLD in this web thingy. It's the one JS framework with the most GitHub stars (146k in March, 2020) and is used by 3,3 million people, according to GitHub ↗.
To translate this: I don't like React because it's so popular in general or it is so "old". I like it because of all the perks these two points bring with them.
Due to these facts React has a massive community behind it. There is always an active and (in most cases) constructive discussion on Twitter about new features and problems where you can get help from and learn a lot.
There are super great subreddits like /r/reactjs ↗ where every news about React is being discussed, people present cool tools they built with React and if you need help, people will take a look at your problem and suggest solutions.
There are so much great tutorials, blog articles, video courses and podcasts on React which teach you everything about it.
A lot people may have had the same problem or bug as you and there are already bulletproof solutions available. People help each other whenever they can, which makes the journey to get better in React a lot of fun.
And finally: React has one of the best Docs ↗ I've ever used which gets better and better everyday.
Reason two: it's just a view library
React is not a full framework. Instead it focuses on the view layer, on building user interfaces and on building what the user interacts with and what helps him, accomplish several tasks.
React comes into action when you have a static website and want to switch to a website where the focus is on the user interactions and updates of the user interface.
You just want to build a view that reacts on the user input and is clever enough to only update what should be updated. It enables you to take that step without shipping you overly complex extra stuff you don't need. That's why React is your best bet and why I like it so much.
Of course at some point you may need additional tools, which are not included in React by default - like routing or other state management solutions. But in most cases you won't need these and you're good to go with what you get from the beginning.
If you want to support me, you can buy me a coffee. I would be very happy about it!☕️ Buy me a coffee ☕️
I wish you a wonderful day! Marco