Ask A Question

Notifications

You’re not receiving notifications from this thread.

Is 'js.erb' approach obsolete? What are the alternatives?

dk asked in Rails

Just like in the title, is using js.erb a bad practice? What are the best alternatives to manipulate the DOM?
I am trying to understand when to use each approach correctly, like stimulus or turbo streams etc.

Reply

I don't believe you'll be able to use .js.erb responses in Turbo going forward. They're pretty much replaced by TurboStreams. 👍

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.