Hi  all,

I wanted to share something I’ve been working on: Breezy It’s the "rails 
way" to integrate React, Redux, and Rails <https://github.com/jho406/Breezy>. 
It's actually a fork of Turbolinks 3 and JBuilder. 

While Turbolinks requests the next page’s HTML and does a `<body>` 
replacement, Breezy requests the next page’s props (written using 
JBuilder-like syntax) and does a replacement in your redux state. Here's 
how a page visit would look like:


this.props.visit('/posts/1')


And here's a preview of your views:


views/
  posts/
    index.js.props
    index.jsx
    show.js.props
    show.jsx

You can do a lot of things like fragment deferment, fragment fetching, 
preload multiple pages in a single request, instaclick-ing. There also room 
for custom reducers when you need to do something more complicated.


There’s the usual url helpers, i18n helpers, routes.rb, and jbuilder-ish 
templates, but now I get the benefit of awesome React component libraries 
like Polaris <https://polaris.shopify.com>. The best thing is, at the end 
of the day, it feels like a vanilla Rails workflow with just the right 
amount of Javascript.

Feedback welcomed!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/6246f8a7-4b71-44ab-9995-7a88cee96281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to