Using Jade as a Substitute for Blaze or React in Meteor

Good day,

Forgive my ignorance as I am still learning but I was hoping that someone could advise me with regards to a few queries around the use of the jade template engine with Meteor.

I’m very worried about the recent news going around the forums that Blaze is eventually going to be phased out.

I thus wanted to confirm the following:

Can jade be use as a substitute for Blaze in every instance?
Can jade be used as a substitute for React?
I assume that jade is much easier to learn than React, especially as it is somewhat similar to Blaze, would everyone agree?
Would it be relatively easy to refactor existing Blaze templates in favor of jade?
Is it best/necessary to use jade and React together?

Thanks

Jade is a substitute for handlebars, not blaze. Search fastosphere for jade. I believe there are ways to work with jade and jsx but i dont know of the top of my head, just Google it.

I would say no because in React you also write pretty standard HTML. You can read in the React docs what is different, but it’s not that much. Learning React is not that much about learning JSX. That’s only a small part of it.

In Blaze u can replace Spacebars with Jade.
In React you can for example use Coffeescript https://medium.com/@chetcorcos/shindig-react-js-coffeescript-c79d01197203#.d531x97jr

blaze is much easier, but this comes at a cost of background complexity (tracker) so they dropped it. If you look forward using blaze-like templating you are better off with other frameworks, like Aurelia.

So when Blaze eventually falls away, Handlebars for Meteor will also not work, correct? What else, besides the Handlebars code would need to be refactored within existing working repos?

I’ve heard a lot of positive comments around Riot.js as well. Guess it’s a little too new to rely on for production apps though, right?

Is MDG planning on supporting Riot?

1 Like

they will work, but will lack some features.

The community can support any view layer they want, I don’t think the MDG will start on riot.js anytime soon, but it looks really nice.

Blaze will never fall away. You will always be able to use it in its current state. It’s the best supported view layer for Meteor right now, so why would you use something that is not supported at all? Unless you are willing to do the integration work yourself, you are better off using a well supported view layer like Blaze, React or AngularJS.

As side note: If you want to write HTML quicker, use Emmet. It’s supported in every serious developer editor (WebStorm, Atom etc.).

I’ve used jade (mquandalle:jade package) for as long as I’ve used meteor, and can’t live without it. It integrates seamlessly with Blaze and templating, so no worries there.

I have not been successful in my quest to use jade with React however (in jsx), so I’m back to the stone age there. It is worth it though, it encourages me to write less HTML and more components.