|
|
|
|
|
by atonse
3689 days ago
|
|
Not to beat a dead horse but this boilerplate issue is one of the biggest values of ember-cli, and the main reason I advocate for it over most of the other frameworks. I don't want to spend days figuring out my asset pipeline, build scripts, and implementation of flux/gulp/grunt/webpack/broccoli blah blah. It's good those choices exist, but I don't care about the differences enough anymore, I just want to build my app. Plus, you lose the sense of common solutions when there's this much variance. angular has adopted ember-cli into angular-cli – any plans by the react community to do this? |
|
First, you would need to define what a React framework looks like, which libraries it needs and which conventions it should use while wiring them together, then build tools around that.
Version 3 of React Boilerplate takes steps towards that by deciding on a set of tools, libraries and conventions and providing code generators for adding to them in a compatible way, but the initial wiring is still done as boilerplate (like it says on the tin).
react-project [1] was heading towards something more like managing this wiring behind the scenes as a dependency rather than a boilerplate, but it's not being actively developed any more at the time of writing.
---
I think React and view libraries like it also necessitate a slightly different approach in that there's no overarching thing to hook into behind the scenes - you just write a bunch of JavaScript and what it returns (plus side effects) is exactly what you get.
For example, to use Font Awesome icons with Ember via ember-cli, you install ember-font-awesome and the next time you run ember-cli it does... something... such that an fa-icon component is now magically available in your templates. [2]
In React, you install react-fa, import it into module scope where you need it and use it as part of what a render() function returns - your build tools handle it the same as any other JavaScript and CSS you've imported. [3]
[1] https://github.com/ryanflorence/react-project
[2] https://github.com/wycats/github-issues-demo/commit/a3358026...
[3] https://github.com/insin/react-nwb-github-issues/commit/cad3...