News for hackers. Stuff that matters.
Re:How I learned to stop worrying and love React by bryanlarsen on Saturday May 16, 2015 @10:18AM (#9556158)
To each their own, I guess. I think that any template that's more than 4-5 lines (not including closing tags) is generally a mess and can benefit from being split into more components. AKA the single responsibility principle.

Structuring a program with a large number of small components is very awkward when templates and code are in separate files.

As far as that 1000 foot view, a nice tree view of React components is vastly superior to a wall of text cluttered up by meaningless implementation details like "div".

Re:How I learned to stop worrying and love React by cloverich on Saturday May 16, 2015 @10:58AM (#9556302)
> Structuring a program with a large number of small components is very awkward when templates and code are in separate files.

I agree. We've developed a fairly complex Ember application, and the component hierarchy feels cluttered with everything separated by component and template. E.g. I have /my-component/component and /my-component/template instead of just my-component.js. Its funny coming full circle in MVC apps, but I find myself frustrated writing 1-5 line templates -- that I have to import. Why can't I just put it in the same file as the component, and have one file? Subjective to be sure, but I'd much prefer React style components in our project.

Re:How I learned to stop worrying and love React by mixonic on Saturday May 16, 2015 @02:32PM (#9557111)
Check out this addon: https://github.com/pangratz/ember-cli-htmlbars-inline-precom...

We've started using it for inline templates in tests, but it should work just great with inline templates for components.

The pods convention you described definitely helps though.

Re:How I learned to stop worrying and love React by KurtMueller on Monday May 18, 2015 @08:39AM (#9564046)
You should look at ember pods - it's already built into ember-cli. It basically organizes your project's folder structures live you've described. All 'posts' related items go into a posts folder - its routes, components, templates, controllers, etc.