News for hackers. Stuff that matters.
Re:Modern Front-end in Rails by jlebrech on Friday December 08, 2017 @10:50AM (#15879491)
I think Vanilla Rails sprinkled with a bit of React can go a long way.

Not every part of an app needs the duplicity of state, or need to look dynamic.

Re:Modern Front-end in Rails by meesterdude on Friday December 08, 2017 @11:49AM (#15880006)
> sprinkled with react

I can sprinkle in javascript for a normal rails app to add behavior - but i thought react required moving all rendering into it? are you able to "sprinkle" with react within otherwise normal html/css/js?

Re:Modern Front-end in Rails by cies on Friday December 08, 2017 @12:17PM (#15880207)
Yes you can. Not like jQuery where you use it to manipulate the DOM (as rendered from HTML generated on the server).

With React you basically let it manage one or more subtrees of the DOM; you let React do the rendering for that subtree at all times (possibly using React on the server to do pre-rendering).

Re:Modern Front-end in Rails by jemminger2 on Sunday December 10, 2017 @11:20AM (#15892044)
It's even easier to sprinkle with Vue.js
Re:Modern Front-end in Rails by mmontoya on Friday December 08, 2017 @08:08PM (#15883528)
The best approach is to let that Webpack handle SCSS/JS but still you can create most of the site with old good HAML.