Getting started with Meteor and React
sergiotapia.me
sergiotapia.me
My experience from someone who is fluent with JQuery/Dom manipulations:
- Javascript has come a long way. But syntax still is ugly. - With ES6, I predict coffeescript will fade away in the near future. - Development on the front end is getting complex
- Use a tool like Webpack or Grunt or Browserify - IDEs haven't caught up to javascript development...yet.
- Thinking in React JS takes some getting used to but pays off in the future when viewing everything as a component.
WebStorm is certainly close. It doesn't have much of the ES7 strawman stuff, but I wouldn't expect it to. However, it works great with NPM modules, import/export syntax, destructuring, generators, etc etc.
How do you use React and Django? Have you tried building an "isomorphic" (buzzword alert) application using React/Django?
I found this really cool, so I did my own version of the tutorial but using ES6 instead :)
http://www.simonhartcher.com/getting-started-with-meteor-and...
FlowRouter is better in that regard because it's 'dumb'.
I find it easier to reason about my code/state by having a dumb router and letting my templates decide what to render.
I'm still using it in one of my projects and haven't had any issues, perhaps because I'm not using more advanced features provided by it.
Why?
For a longer answer, take a look at the discussion of issue #4433 on github [1], especially the following comment by spicyj [2]:
> [...] We're sticking with className and htmlFor for a couple of reasons:
> First, we tend to look at HTML properties (like el.className = ...) when possible, as opposed to attributes (like el.setAttribute('class', ...)). Attributes are always string-typed, while properties can have any JavaScript object value, which gives more flexibility in some circumstances. One example is the .classList property, which arguably is a better fit for the data model than .className is. React doesn't support classList right now, but it certainly could. Given that React's className behaves like the HTML property of the same name, it makes sense to keep that name.
> Another reason is more forward-thinking. In the future, idiomatic React may use object destructuring to pick apart this.props. The react-future repo shows one example of how this could work. Even in modern browsers, this wouldn't work with class and for which are keywords and can't appear as standalone identifiers even though they can appear as property names.
> Third, our thinking is that JSX's primary advantage is the symmetry of matching closing tags which make code easier to read, not the direct resemblance to HTML or XML. It's convenient to copy/paste HTML directly, but other minor differences (in self-closing tags, for example) make this a losing battle and we have a HTML to JSX converter to help you anyway. Finally, to translate HTML to idiomatic React code, a fair amount of work is usually involved in breaking up the markup into components that make sense, so changing class to className is only a small part of that anyway.
----
[1]: https://github.com/facebook/react/issues/4433 [2]: https://github.com/facebook/react/issues/4433#issuecomment-1...