Here’s my recap of the recent Blaze thread and everything that’s been going on recently. It also includes some practical advice about what you can do right now:
https://www.discovermeteor.com/blog/blaze-react-meteor/
Let me know what you think!
Here’s my recap of the recent Blaze thread and everything that’s been going on recently. It also includes some practical advice about what you can do right now:
https://www.discovermeteor.com/blog/blaze-react-meteor/
Let me know what you think!
An excellent article and I enjoyed reading it. The fun part is that you struggle with the same issue, decide how to proceed but then keep us dangling…
We are an excellent example of people who use your book and follow every step. So starting a new project, we need it! … But… now, you say two things: 1) when you start a new project, go for React, 2) we ourselves keep writing the book with Blaze.
So, you confuse us even more… Help !
PS - Actually I think MDG could have made their Blaze-Reaction storm more quiet, if they would speak out and “core” on other things so to show their community that they do care about consistency, even if Blaze/React forces a different course. I think they could decide on:
To clarify my own position, I believe that if you can use React (in other words: it’s a new project, and you already know React or are interested in learning it), you should use it.
But if you can’t, then I think you can keep using Blaze for the foreseeable future with no immediate downsides. The eventual migration will happen in a while, and even then I think it should be relatively straightforward provided you follow a few Blaze best practices from the start.
And regarding your other points, they’re pretty much all answered decisively by the Meteor Guide project:
Did you have a few Blaze practices in mind when you said this or better yet a resource of Blaze best practices from your perspective?
People definitely need this guidance right now, and Discover Meteor is the best voice for it to come from. I’d just add here:
something like this:
But this likely won’t always be the case. There are already community efforts that will give you a more Blaze-like experience while using React. TrackerReact
– an independent React mixin and sub-package of the Blaze React project – is one picking up steam that removes the need to use getMeteorData
. Using it, all your JSX code within render
methods is automatically reactive just like within Spacebar templates. The future likely will be one where the best of Blaze/Tracker and the best of React make for a nice marriage.
“React doesn’t have an actual templating syntax like Blaze’s Spacebars, but instead lets you insert bits of JavaScript right in your HTML thanks to its JSX file format.”
Or rather “lets you (appear to) insert bits of HTML right into your javascript”
Also:
“You can use Spacebars with Blaze right now thanks to the Blaze-React project.”
“You can use Spacebars with React right now…”
As @sacha mentioned, all these decisions have been made in the guide, but just to be clear, here is our guidance on these:
Hope that helps ramp up the percentages for you a little.
@sacha mentioned a few in the article, but it’s worth mentioning:
Abhi Aiyer’s Blaze tips: https://medium.com/@abhiaiyer/architectural-tips-for-people-still-writing-ui-in-blaze-a034d7bc6d0
Our outline of the Blaze guide article (“best practice” section), which covers the same ground and a bit more: https://github.com/meteor/guide/blob/master/outlines/blaze.md
Hope that helps. More detail to come.
I mentioned a few in the article, but I also think @tmeasday might be working on a blog post about this topic.
@faceyspacey thanks for the suggestion
I agree with others that it was a great and clarifying article.
I would suggest that another approach here is the migration approach (which I’d likely do in two paths:
This provides a possible pattern to start with: Smoothly feature up your Blaze Apps with React Components
This is clearly somewhat of an over simplification. But it seems like a workable strategy.
That said I’ve not started doing this yet myself so I’m not sure what the “gotchas” will be.
There is a lost of talk about react VS blaze but what about angular, how does it fit into all of this. We are going to start a few projects with meteor and blaze seems to be out of the question so it comes down to react or angular (1/2)? Any thoughts?