react-rails
jsbundling-rails

react-rails | jsbundling-rails | |
---|---|---|
23 | 39 | |
6,757 | 897 | |
-0.0% | 0.4% | |
6.8 | 5.9 | |
9 months ago | 4 months ago | |
JavaScript | Ruby | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
react-rails
-
Integrating Ruby on Rails with Modern SPAs
The current gem does not help you with this however since it is designed for SPA frameworks. If you wish to take this approach, you can build your own system or use Gems like react-rails and turbo-mount. Turbo Mount uses Stimulus to mount components, and is more robust if you are using Hotwire in your ERB views.
-
Ruby on Rails 8 with Vite and Tailwind CSS 4
> But what if you want to use React?
Then just use React. There's nothing stopping you and it's well supported.
You can use either https://github.com/rails/jsbundling-rails
or https://github.com/reactjs/react-rails
Personally would also go with a No Build set up. i.e. https://hotwire.io/ and import maps.
-
React + Ruby on Rails without any gems
One is to add a gem: react-rails or react_on_rails for example. But there is a way to have a simple integration without using these gems.
-
Why there is no django-react or django-vue package like, for example, Rails has?
https://github.com/reactjs/react-rails here is the functionality and simplicity that I would be kind of looking for. The option for it to exist in Django ecosystem is not that outlandish and I wouldn’t be too ignorant of it having to make sense or not make sense to everyone :)
- React-Rails is a flexible tool to use React with Rails
-
Rails with Svelte or React/NextJs?
You can however use reactjs with rails, there is a gem for it https://github.com/reactjs/react-rails
-
Connect a Ruby on Rails App with React in a Monolith
The react-rails library is one of the most popular Ruby gems to integrate React with Rails. It provides generators for components, testing helpers, and view helpers to render JavaScript code inside the views.
-
React elements not showing up in Rails app?
I'd checkout https://github.com/reactjs/react-rails
jsbundling-rails
-
Ruby on Rails 8 with Vite and Tailwind CSS 4
> But what if you want to use React?
Then just use React. There's nothing stopping you and it's well supported.
You can use either https://github.com/rails/jsbundling-rails
or https://github.com/reactjs/react-rails
Personally would also go with a No Build set up. i.e. https://hotwire.io/ and import maps.
- Rails Merging Support for Bun.sh
- Rails Frontend Bundling - Which one should I choose?
-
Is the default importmap method unrealistic in the most popular real world use cases?
I think this is more like a demo - you will not get the same features as jsbundling-rails by only following instructions in the video. For that you will need to change some other files as well. You can find out what files to be added/changed from the install script. The important bits are mostly the same as in the video, but some supplement parts are not mentioned in the video. Some people actually reported in the comment that they can't deploy such app, but I think it depends.
-
at my wits' end.. please help me figure out why javascript won't work (Rails 7 with esbuild)
I'm sorry, I didn't see that in your title. Using esbuild is 100% supported by Rails through this gem https://github.com/rails/jsbundling-rails. Have a look at the docs there to make sure that you're setup correctly.
-
Configure Stimulus with esbuild and Babel — Rails & Javascript
Rails applications are bundler-agnostic. They do not care how you bundle your javascript code. It just expects whatever comes from the bundler to be placed under app/assets, so the asset pipeline processes it. We can see this in the official jsbundling-rails gem, which consists of scripts to install different bundlers and configure a default npm build command to generate our bundles—no interaction whatsoever with the Rails configuration. This black-box bundler logic allows us to change and update our bundler system without tuning any other aspect of our Rails application.
-
foreman: not found
Hello, this is my first time setting up a rails app that also uses react, I am using https://github.com/rails/jsbundling-rails I went with esbuild because I am following this tutorial on setting it up https://www.youtube.com/watch?v=yoLJXjEV2nM, however when I run bin/dev in the terminal I get the error bin/dev: 8: exec: foreman: not found
- Ruby 3.2 + Rails 7 + Tailwind + Font Awesome - should be blazing fast, yet tests very slow. 20 requests are being made. How do I make fewer requests, create fewer objects and make this simple app super fast? Production : https pickaxe dot ca. Thank you! -Dan H
-
How to bundle assets in a Rails engine
You first install your asset handlers as you need them for your project. They can be anything from rails/jsbundling-rails and rails/tailwindcss-rails to webpacker or something custom.
-
Comparing Phoenix to Rails in December 2022
The functionality comes from https://github.com/rails/jsbundling-rails and https://github.com/rails/cssbundling-rails -- both come with Rails 7 and all you have to do is generate your app with the choices you want such as -j esbuild --css tailwind.
What are some alternatives?
inertia - Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.
importmap-rails - Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling.
react-on-rails - Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance.
shakapacker - Use Webpack to manage app-like JavaScript modules in Rails
hotwire-livereload - Live reload gem for Hotwire Rails apps.
vite_ruby - ⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
