I have recently been learning about React, which, as you probably know is a JavaScript library. As far as I understand it, one of its greater strengths is that it works with a virtual DOM, which makes updating the real DOM faster. If you google it, you'll find lots of reasons to use it as well as reasons not to use it.
What is your take on React? Do you like it? Do you find it too big? Does it perform well? What are your reasons for using it or not using it?
Top comments (14)
I use React professionally; but am happy enough switching between frameworks.
Likes:
Dislikes:
Alternatives:
Thanks for your comment. I share several of your likes and dislikes.
You have intrigued me with Svelte. I'll have to add it to my list.
I do like React's idea of using a virtual DOM, and it really simplifies frequent and complex state updates to the DOM. Being able to just drop in how the DOM should look like based on the current state, instead of having to manually figure out what needs to be updated when, and having the library only update the relevant parts of the DOM, makes developing web apps considerably easier.
I'm not a big fan of stateful components, though. I prefer working with hyperapp, which is similar to using React + Redux minus all the boilerplate. Either that, or I use a pure virtual DOM library* (like superfine or snabbdom) and roll my own state management.
* By pure virtual DOM library I mean a library that only does virtual DOM, not a library free of side effects. React nowadays has a lot of state and event management built in.
By the way, I've read the second article you linked and it is so wrong I don't even know where to start.
So far, I love it. It's relatively easy to pick up, its slick, loads fast and has been a great experience so far.
Plus, its in HIGH demand so I'm all about React right now
Other than being easy to pick up, what would you say is its greatest strength?
I don't know much about Vue or Angular thus instead of technical aspect, I find that the large community is an advantage.
That means you can learn and get supports from other developers fairly quickly.
A larger doesn't necessarily translate to such a behavior but I found the React community very vibrant and supportive of each other.
That's true. Supportive communities and proper documentation are good assets for any library.
I like a lot of React's fresh ideas about VDOM, and component-based, and even JSX, but I feel like I dislike pre-compiling, translating, transpiling and totally any "pre-*".
I know that the process of building have become a must nowadays, But all of those abstraction feel awkward.
I also tend to dislike having to pre-compile things.
Personally I don't really like the way they deal with exceptions and errors. There were several moments when errors happen the screen just go blank without any easily accessible stack trace, error message or related information, unlike other frameworks which I use such as Laravel.
React.js is great by having the component concept which allows reusing the same construct for rendering similar structures, but when the data hierarchy becomes complicated, without a central storage of states it would be very difficult to manipulate nicely and write neat codes.
Thanks for replying in such detail, that's very interesting.
I am newbie dev and i jump from one language to another as fast as the company i work for completes projects. I find the whole single page arrangement fascinating.
It is a quite nice fit for ClojureScript development.
reagent-project.github.io/