reactor
Our great sponsors
tailwindcss-rails | reactor | |
---|---|---|
20 | 11 | |
1,345 | 612 | |
2.1% | - | |
8.5 | 7.1 | |
9 days ago | about 1 month ago | |
Ruby | Python | |
GNU General Public License v3.0 or later | - |
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.
tailwindcss-rails
-
Is the default importmap method unrealistic in the most popular real world use cases?
You can't use additional CSS packages (like Flowbite) with the official tailwindcss-rails gem. According to this answered issue, you should either give up importmap and use a bundler, or use a CSS file from CDN - which is not ideal (unnecessary classes won't be purged this way).
-
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.
-
Setup TailwindCSS, postcss and esbuild on Rails 7
Preconfigured TailwindCSS from TailwindCSS-rails ready to use out of the box, pass --css tailwind as an option.β
-
User notifications with Rails, Noticed, and Hotwire
Thanks to the magic of Rails, the scaffold generator gives us almost everything we need to start creating messages and associating them with users. Because we are using Tailwind via the tailwindcss-rails gem, the scaffold generator also includes some nice looking base styles too.
-
Pagination and infinite scrolling with Rails and the Hotwire stack
Because we are using Tailwind via the tailwindcss-rails gem, the scaffold generator applies some basic Tailwind styling to generated views, so we have nice looking Widget pages right out of the box.
-
Launching Multiple Processes with a Single Command in Rails
Here's a simple way to achieve this, inspired by the tailwindcss-rails gem.
-
Upgrading from Rails 6.x Webpacker to Rails 7 Importmaps
gem "rails", "~> 7.0.0" # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] gem "sprockets-rails" # Use postgresql as the database for Active Record gem "pg", "~> 1.1" # Use the Puma web server [https://github.com/puma/puma] gem "puma", "~> 5.0" # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] gem "importmap-rails" # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] gem "turbo-rails" # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem "stimulus-rails" # Use Tailwind CSS [https://github.com/rails/tailwindcss-rails] gem "tailwindcss-rails" # Build JSON APIs with ease [https://github.com/rails/jbuilder] gem "jbuilder" gem "redis", "~> 4.0"
-
Rails 7 Tailwind Scaffold Question
When you generate an app with rails new --css=tailwind without a JS option, you get the tailwindcss-rails gem which includes the new scaffold generators. When you pass in a JavaScript option as well, you get Tailwind installed via cssbundling-rails, which does not include built-in generators since it offers more than just Tailwind as an option.
-
Effortlessly install TailwindCss in a Rails app with Webpack (minimum configuration)
A while back DHH decided to created a gem for easily installing TailwindCss into rails apps ππ». This gem could be used to install Tailwind through the asset pipeline as well as using webpack. This changed later on as contributors wanted to focus their attention to what was the heart of the gem π₯Ί.
-
Rails and Inertia.js - The Modern Monolith
I'm going to use the tailwindcss-rails gem, the only thing you need to do is to run these two commands in the console:
reactor
- Launch HN: Pynecone (YC W23) β Web Apps in Pure Python
-
Django equivalent to Rails Hotwire
There is a library for Django that does the same thing, I havenβt tried it but it does look good and well maintained. The library is called Reactor (https://github.com/edelvalle/reactor)
-
Back-end languages are coming to the front-end
I'd love to see this approach make more headway in the Django community. Based on the last DjangoCon it seems like the community is coalescing around HTMX.
This tool does play very nicely with Django's templating engine; you can just have HTMX re-render a particular template block on the server, and send down that updated block. The migration path is quite clean; you just wrap your "HTMX-updated" template block in a `hx-post` div.
Having not gone too deep on HTMX, I'm interested in folks' thoughts on where it's lacking vs. LiveView and Hotwire. One area I can see is performance; Elixir is going to be faster than Django, and so if you're trying to handle high session counts over websockets. But the impression I get is that HTMX is a bit more light-weight, so I'm wondering if there's usecases that can't be met with it vs. LiveView.
Other Django libraries that haven't quite seen as much uptake:
We have https://github.com/edelvalle/reactor, and a port of Hotwire: https://github.com/hotwire-django but both of these don't seem to have much adoption (yet!).
-
Reactive Clojure: You don't need a web framework, you need a web language
Thank you for posting those, I wanted to post them but I don't comment often (). Wanted to chip in another contemporary: edelvalle/reactor, which is inspired by LiveView[0].
[0]: https://github.com/edelvalle/reactor
I am using Hotwire for a project, and I'm learning Elixir and Phoenix on the side. Finding edelvalle/reactor was immediately helpful to me though, because I cut my teeth on Python/Django, so reading a Python reference implementation helps me learn nuts and bolts of libraries, faster. (so, I figure that this might help someone else grok how these approaches work.)
-
How to combine Rails's Ajax support and Stimulus
If this sounds like a barebones version of notable frameworks like Elixir's Phoenix LiveView, Rails's StimulusReflex or Hotwire Turbo, PHP's LiveWire, Django's Reactor... well, you're right! (Bonus: my colleague @jgaskins built a LiveView clone for Crystal)
-
Phoenix LiveView/Laravel LiveWire alternatives for Django
Reactor
-
HTML over-the-wire is the future of Web Development
Reactor is a LiveView library for Django. It enables you to do something similar to Phoenix LiveView using Django Channels.
-
Django with htmx for easy and efficient SPAs
It looks a bit similar to Elixir Live View. Or similar in Django https://github.com/edelvalle/reactor, there are a couple of libraries.
-
StimulusReflex, or LiveView for Rails
Django does: https://github.com/edelvalle/reactor
What are some alternatives?
django-unicorn - The magical reactive component framework for Django β¨
cssbundling-rails - Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
django-htmx - Extensions for using Django with htmx.
turbo - The speed of a single-page web application without having to write any JavaScript
Phoenix - Peace of mind from prototype to production
htmx - </> htmx - high power tools for HTML
Pagy - π The Best Pagination Ruby Gem π₯
Elixir - Elixir is a dynamic, functional language for building scalable and maintainable applications
morphdom - Fast and lightweight DOM diffing/patching (no virtual DOM needed)
Foreman - Manage Procfile-based applications
forem - For empowering community π±
Ruby on Rails - Ruby on Rails