What are the pros/cons of swapping Blaze with React?


#1

Aside from the obvious opinions of speed ease of use. What are the pro’s and con’s of swapping Blaze for React?

I’m still very new so I’m looking at where I can reduce the amount of tools I have to learn.

Currently I see the PROS as:

No templating (underscore/blaze?)
No CSS pre-processing (when using inline)
No jQuery

CONS:

Most Meteor packages would be using Blaze and jQuery
Less people using it = less help when stuck

So this would mean no useraccounts:core - what else?

@zoltan @tmeasday


Is React better than Blaze?
#2

Hey @commoncreative - well we wrote up our thoughts on it here: http://blog.percolatestudio.com/engineering/reactive-user-interfaces/

I’m not sure using React will reduce the amount of tools you need to learn. Probably there’s a good chance you’ll end up needing to understand Blaze as you work with Meteor anyway, and I don’t think jQuery is any more a requirement with Blaze than it is with React.

CSS-in-JS is probably something to avoid if you are still learning, I’d say – plus you can do it in Blaze if you really want.

Like you said, you’d find it more difficult to use accounts-ui and any other package that provides a Blaze UI, although there’s no fundamental reason why a Blaze template couldn’t be embedded inside a React component.

The reason to use React is definitely when you start needing to engineer more complex components. I think until you start working on such problems Blaze is fine to get started with.


#3

Cheers for the response. Definitely need to learn Blaze to go through the tutorials. That’s interesting the idea of using Blaze inside a React component. Will just focus on vanilla Meteor and progress my knowledge as I go :smile:


#4

React is faster.

React is more complexity.

We discussed about it a while ago


#5

I would add that React doesn’t work that well with DOM manipulations from outside, if you have a 3rd party widget, a Facebook Liked widget, or just a jquery plugin that creates a gallery - Blaze would most likely just let the 3rd party manipulations happen and React will restrict you from doing this.


#6

I saw that. But it didn’t answer my particular question.
Aside from opinions such as rendering speed and easy vs complex I was looking for exact gains and losses.


#7

that’s exactly what react was built for.

Most of its code is dedicated to speed (virtual dom implementation), a bit of it is dedicated to easy vs complex.

React authors think that their approach is easier (and to some degree I agree). Meteor use another approach.

If you don’t already know react, or don’t need speed, there are very few reasons to use react in meteor.


#8

My main reason is my end game is ClojureScript and David Nolan has created Om with React so either there is something to it… or Om is purely experimental as he said in one of his talks.