I just recently read the Meteor blog post talking about 1.2.
Matt mentioned the ability to use ES6 , and encouraged that we start using it now in our app development with Meteor.
Does anyone have instructions or know the preferred Meteor route to using ES6 vs. the old JS ?
Nope, I also used to think JSX was a templating language.
The React package uses Babel to transform JSX files. You can use any ES6/7 and it will still compile down to ES5.
The JSX isn’t a whole template file, rather it just parses <div name='bob'></div> and then transpiles it to a function like React.DOM.div({ name: 'bob' });. If there’s any es6 syntax it’ll transpile that too. React heavily uses ES6/7 in the component.
However I do think the extension may be a bit confusing for other team members
It seems more legit than just adding react, right? Matt’s blog post seems to suggest how we can use it now, but there are no instructions on how to do so.
There is no such package babel. Do you mean grigio:babel? I’m trying to use whatever MDG is going for in 1.2 as opposed to that, because it’s going to be obsoleted.
I do see babel-compiler and babel-runtime, but not sure how they work with a Meteor 1.1 app. They seem to be intermediate packages for the transpiling process that are not hooked in to the whole pipeline yet.
I couldn’t find this one at atmosphere, but there’s one named just plain ‘jsx’ from mdg that says it also has has react and react-meteor-data as dependenants, but only actually installs babel-compiler and babel-runtime. i.e. it’s the Babel on which react depends. Oddly, the JSX it shows on the Atmosphere page contains React style markup in the code, so I’m a little confused…
JSX is the package that react requires when you do meteor add react this allows you do build your own react stack in case you want to use CJSX with coffeescript or something (or some people don’t use JSX with React also).