Live data from Hacker News

This Week in Rails: jQuery no longer part of Rails, and more

weblog.rubyonrails.org

1–10 of 143 posts

Re: This Week in Rails: jQuery no longer part of Rails, and more

#4
There's still some discussion around the options [0], for now, the new native js approach is mandatory, even for jquery users. That might not remain.

Also exciting to see Yarn already being supported [1], though not so excited that npm support might get dropped entirely in favour of yarn.

[0] https://github.com/rails/rails/pull/27113

[1] https://github.com/rails/rails/pull/26836

Re: This Week in Rails: jQuery no longer part of Rails, and more

#5
In a way, it's an end of an era. What jQuery did for the industry when it first came out was amazing. Normalizing differing browser APIs, making cumbersome APIs more palatable, providing powerfully expressive query selectors, enabling fairly trivial plugin development, and the nifty monadic chaining.

Some of those issues have been addressed by browsers, making vanilla JS a little less unreasonable. For other bits, rails-ujs provides some niceties that aren't worth carrying all of jQuery to have. These days most developers will want to use le framework du jour, and don't need jQuery for DOM querying and manipulation.

Re: This Week in Rails: jQuery no longer part of Rails, and more

#9
Really interesting, the replacement is a vanilla js implementation called rails-ujs and was made by someone who went through Google Summer Of Code!

"The new rails-ujs was developed by @liudangyi as part of Google Summer of Code, all credits for this goes to him and to his mentor @pixeltrix " - https://github.com/rails/rails/pull/27113

Re: This Week in Rails: jQuery no longer part of Rails, and more

#10
jQuery is/was incredible, and deserves every single bit of praise heaped upon it. But it is nice to see coding going back towards "vanilla" JS - it wasn't so long ago that every JS answer on Stack Overflow just assumed you were using jQuery and you struggled to find an answer that didn't require it. That's not the case any more.
Post reply on HN