webpack-rails icon indicating copy to clipboard operation
webpack-rails copied to clipboard

"react-rails fork for use with this workflow" from TODOs

Open patbenatar opened this issue 9 years ago • 9 comments

Hey @mipearson — I noticed this in the TODOs on the README and I'm interested in helping out if I can. Did you have any ideas or plans for this that I can use as a starting point?

P.S. nifty package you got here, thanks for it!

patbenatar avatar Feb 14 '16 18:02 patbenatar

It's in progress - need to get docs correct & redo the demo repository. See https://github.com/mipearson/webpack-rails/tree/React

mipearson avatar Feb 14 '16 20:02 mipearson

Also, thanks :)

mipearson avatar Feb 14 '16 20:02 mipearson

Thanks for all the work over here - I really like the look of this gem. I was just wondering whether this todo entails the equivalent of the 'react_component' view helper and the react_ujs jazz provided by react-rails? We make heavy usage of it (where we don't do any server rendering at this stage).

mcoetzee avatar Nov 01 '16 12:11 mcoetzee

@mcoetzee It's more adding a helper to the existing react-rails gem so that server side rendering works.

We also use the react-rails gem at Marketplacer along with webpack-rails - we just don't use their bundled react.

mipearson avatar Nov 01 '16 20:11 mipearson

I would appreciate some documentation on webpack-rails + server-side react rendering. We're still in the process of killing the asset pipeline but would love to figure out how to get server-side rendering with webpack in rails.

juanca avatar Nov 01 '16 21:11 juanca

We're not using it yet, unfortunately. I have a prototype branch that's been working for a long time, but I need to get a demo environment/documentation together. See comment above.

mipearson avatar Nov 01 '16 21:11 mipearson

Sounds good. I'll try to give it a go and provide feedback.

juanca avatar Nov 01 '16 21:11 juanca

@mipearson Ah thanks ok I'm on the same page now. May I ask whether you guys are doing something special in order to bundle react_ujs? I was thinking today that it could be a good idea to put the react_ujs code up on NPM...

mcoetzee avatar Nov 01 '16 22:11 mcoetzee

Oh, right. There's an example of what we're doing in the React branch - we vendor our own copy of the react_ujs file.

mipearson avatar Nov 01 '16 23:11 mipearson