[Discussion] React
We have interest in using react in Rocket.Chat. This ticket is to discuss
- Pros / Cons
- Why you would like to see this
- Suggestions for how to go about this
- Voicing support / Volunteering to contribute
Some links related:
https://forums.meteor.com/t/next-steps-on-blaze-and-the-view-layer/13561
Go forth and discuss :)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Let's bring all @RocketChat/core here =)
As I said, maybe we should wait for MDG define the future of Blaze. If they succesfully implements a blaze-over-react thing, it should be our best path.
As I see it Blaze 2
Pros:
- Possibly not as big of a learning curve to those that don't know react.
- We can re-use a big portion of our templates.
Cons:
- Any react pro that comes in, maybe turned off being that its using some weird templating.
- We now have another piece we have to rely on being maintained. If MDG dumps it we have another mess to clean up.
- Performance might be impacted by going through the blaze stuff. There is bound to be at least a little. But we don't know if it will be noticeable or not.
Let's wait and see for a month or two. It's hard to make assumptions now. The performance impact may be zero actually, because the template will be compiled/transpiled into react at build time. It won't exists in production... it is like CoffeeScript.
MDG announced that they will drop Blaze 1 development, so no new issues taken on. Also "Blaze 2" will not materialize. As far as I can tell, they seem to mostly ignore the community concerns on the forum ( @sampaiodiego pointed also to follow: https://forums.meteor.com/t/next-steps-on-blaze-and-the-view-layer/13561 I for one objected to dropping the installed base for the next hot thing as I dont like eco-system splits, but well... seems we have no choice.
It will be React, end of story and doubtful upgrade path
MDG was just as clear that we will have ES6 instead of Coffee as main common language. So, it might be that this is a possible pivot point we can even taken to our benefit:. What if all we write in ES6 will be React based so we all know that if it is Coffee, it is still Blaze? Just a thought ;)
@tvld I've noticed the same thing in the discussions.
I think using something outside of MDG's solutions at this point might actually be to our benefit. For one we don't have to wait on them to make up their mind. Second, react is moving fast. I think we might be putting our self at a disadvantage if we limit to what ever version they support. Kind of how we have to force people to use an old version of node... But that's another subject.
tl;dr; We shouldn't put all our eggs in one basket.
Yeah, the MDG waggling is becoming a bit of a nuisance. For example: we like to start contributing to Rocket. But should we learn Blaze ? Or wait until Rocket adopts React ?
I think Rocket has no choice and should become opinionated quickly, otherwise it will hunt them as much as it hunts Meteor now...
If Rocket.Chat is going to decide to make a break from Blaze (which at this point, seems like a smart decision), instead of hopping directly onto React, I'd recommend shopping around a little. Weigh the pros/cons of a few frameworks. For one, I've been blown away with Vue lately, and given their 1.0 release, I'd strongly recommend taking a look at it:
- http://vuejs.org/guide/comparison.html#React
- http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/
Just because React has some neat ideas, doesn't mean they're the only kid on the block. As @tvld said:
...Rocket has no choice and should become opinionated quickly, otherwise it will hunt them as much as it hunts Meteor now...
And I agree with that 100%. But, be a little picky, and weigh more than a single option.
Indeed, also not a big fan of React. I had a look at Vue and it seems promising.
In addition, I would also suggest you to have a look at Aurelia, from the guy at Angular 1 (not 2 ! ;) To me seems especially clean and... plain .js so no new layers or tricks to learn: http://www.aurelia.io or better indeed vue.js
From Blaze to React video series.
https://www.discovermeteor.com/category/blaze-to-react/
@engelgabriel good video's.
Does it mean you decided to go for React full stop? And if we want to learn Meteor to be able to contribute to Rocket, you would suggest us to learn React?
Not yet.. we will do 2 other project in ReactJS next month, and after that I'll be able to give my final opinion on this :)
Ok, we will take that month to learn the structure of Rocket and decide if we should follow your Rocket or go to another one, Aurelia in our case.
Anyway, please do not forget to give direction as soon as you can. People depend on opinions and choices to be able to invest and not doubt or look back all the time ;)
I won't forget, and the reason I want to do this other 2 projects first, is exactly because we understand this is a very important decision. We can't afford to be wrong about this.
@tvld I've actually looked at Aurelia. I come from doing a lot of Angular 1.x projects, and Aurelia looks very clean. I need to play around with it a little.
@engelgabriel ... how are your ReactJs project going? Any influence expected here?
@tvld I think our new docs section we're adding is using react.
I know i've personally been taking a deep dive into react. I like it.
Also i've been noticing other people using react with meteor a lot more.
It looks like the kadira guys are doing some work with it: https://voice.kadira.io/meteor-meets-graphql-3cba2e65fd00
@geekgonecrazy I suppose we are waiting for an official opinion from RC for this. I still stare in love at Aurelia, but love does not built a future. We need clear lines and stick to it, I think. So, hence the question: what will RC do? ))
@tvld Yeah I think all of us are still looking. Kinda like with the es6 discussion. It really comes down to us having time to use it to form an opinion one way or another.
Aurelia does look very nice. Reminds me a bit of angular and angular 2
@geekgonecrazy "Reminds me a bit of angular and angular 2" Seems logical as Aurelia's founder Ron, was part of Angular 1 core but was not satisfied with Angular 2... so started all over.