Live data from Hacker News

Trailblazer: A new architecture for Rails

github.com

51–53 of 53 posts

Re: Trailblazer: A new architecture for Rails

#51
post #35
post #21

Earlier quoted context omitted.

The view rendering doesn't need to be done by Rails. I've been using React and Webpack to build the clientside of my Rails apps and have been very happy with that approach. There is nothing that this architecture does that a clientside framework like React cannot do better.

How do you store/version/deploy that, by the way? Do you build your Rails project purely as an API, and a separate project/repo for the React client?

It doesn't make sense to replace Rails views completely in my view. There are parts of the app that are still being served by Rails views because they are not mission critical or have a great solution already in-place. Where React comes handy is when you have an interactive one-page app with a lot of moving parts. I have 2-3 React apps in this current project. Webpack is a great solution for packaging your css, js and other assets in logical units. I think it's much better than Sprockets, but it requires some configuration.

Re: Trailblazer: A new architecture for Rails

#53
post #51
post #35

Earlier quoted context omitted.

How do you store/version/deploy that, by the way? Do you build your Rails project purely as an API, and a separate project/repo for the React client?

It doesn't make sense to replace Rails views completely in my view. There are parts of the app that are still being served by Rails views because they are not mission critical or have a great solution already in-place. Where React comes handy is when you have an interactive one-page app with a lot of moving parts. I have 2-3 React apps in this current project. Webpack is a great solution for packaging your css, js an…

I've played with Weboack for toy projects. Do you have one Webpack project that builds and watches all your React apps, or do you treat each separately? I have a larger project on my todo list, and I'm considering doing a Rails API and a single React app for everything on the client (including URL routing).
Post reply on HN