Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences between webpacker-react and react_on_rails #39

Closed
justin808 opened this issue Jul 31, 2017 · 2 comments
Closed

Differences between webpacker-react and react_on_rails #39

justin808 opened this issue Jul 31, 2017 · 2 comments

Comments

@justin808
Copy link

justin808 commented Jul 31, 2017

Are there any compelling features offered by webpacker-react with react_on_rails now going directly off webpacker? Do you guys need any help from me? Want to help me with React on Rails?

Here are the PRs that put React on Rails on top of Webpacker:

Other links:

@eadz
Copy link

eadz commented Aug 13, 2017

Hi!

I had a look at both projects, and I think there are some differences in approach.

Webpacker-react simply provides a way to render react components in the frontend of your app. The instructions all fit on the readme, and it seems to work well in my experience out of the box with rails 5.1 and turbolinks.

React on rails is an opinionated framework, much more than a library.

While React on Rails may be a superset of functionality that webpacker-react provides, it is more complex to understand ( a book vs a readme ) and given that it uses react-router, may not be suitable for someone who just wants to add a react component to their frontend.

If I was to suggest a way forward, I wonder whether react-on-rails can be split into clearly defined modules - the rendering of a react component to a page may be one of those modules ( aka webpacker-react ) and for example integration of react-router from the server side may be another module, integration with redux another.

Long term this will benefit both projects!

@renchap
Copy link
Owner

renchap commented Sep 11, 2017

As @eadz said, webpacker-react is indented to be as simple and minimalist as possible to work with a standard Rails environment.

I saw that react_on_rails is now using Webpacker 3, but I feel it brings a lot more than just React. It provides a nice integrated solution, but it does a lot more than this project and adds some complexity.

@renchap renchap closed this as completed Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants