praveenperera
Most Liked
homanchou
Any one tried Morphdom? https://github.com/patrick-steele-idem/morphdom
Supposedly simple way to update parts of DOM preserving states like input cursor positions
As described in this well written blog post: https://0x2a.sh/replacing-react-with-rails-66e25cd23777#.yuwzpcj6m
It feels like I’m seeing more of the “replaced react with traditional rails/turbo-links” type of posts suggesting web-dev is coming round full circle:
Early 2000’s.
Full page refresh is the standard. Works great.
Sprinkle in a little js. Works good.
Add more js, jquery mess. Not so good.
SPA everything. Explosion of frameworks and tools. Total confusion, increased development time.
Now:
No more SPA. Go back to full traditional full page refresh. Hey, still works great!
Now add back a little js… 
(continue…)
nerdyworm
As promised a Phoenix, Turbolinks, React, Redux, and Immutable.js example. Redux and Immutable are not a requirement for this setup, but they make frontend work a tad more enjoyable for me 
source: https://github.com/nerdyworm/returb
demo: https://sleepy-shore-92135.herokuapp.com (disclaimer: user editable content on the internets)
Pain Points/Things I haven’t figured out:
- Mix of html, server side js, and json serialization are required to get everything working in a real app. Full SPA would only require json.
- I’d really like to override the redirect function instead of: https://github.com/nerdyworm/returb/blob/master/web/turbolinks.ex#L2
- Turbolinks caching and react components that change state cause some screen flickering. My current solution is to basically just bust the cache on state changes.
- Remote forms are a bit tricky to get right when react.js components are involved.
- Flash messages are not working, not sure why. Probably simple.
- You have to go all in with Turbolinks if you have any components that depend on global state. I actually have not run into this yet, but I can see it happening in a full featured app.
I do not have that much experience with React and elixir. I could be doing it totally wrong. If I am please help 
If there are any questions just ping me and I’ll be happy to help.
Cheers,
Ben
nerdyworm
I’ve been toying around with a turbolinks/react apps lately. So far it seems quite solid. Turbolinks makes all the crud stuff seem snappy and react allows for the higher fidelity UI to be well designed and sprinkled throughout the app. It has pain points, but far fewer pain points then going full SPA.
If enough folks are interested in this I would be more than happy to extract a demo app out of my project.







