4 ms·
> 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 li
by insin 10y ago
> 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 https://github.com/ryanflorence/react-project
[2] https://github.com/wycats/github-issues-demo/commit/a3358026a42b3438227cff9a3aabb620ce3c09a0 https://github.com/wycats/github-issues-demo/commit/a3358026...
[3] https://github.com/insin/react-nwb-github-issues/commit/cad3abd4ec47f78bf50194ec1bd7cbfb1068e733 https://github.com/insin/react-nwb-github-issues/commit/cad3...