Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

21–30 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#21
post #9

Earlier quoted context omitted.

I know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)

Really? I'd have guessed bootstrap will be phased out completely by CSS grid, which does essentially what bootstrap does...

I'm not sure what you mean.

Re: Bootstrap 5 will remove jQuery as a dependency

#23
post #9

Earlier quoted context omitted.

I know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)

Really? I'd have guessed bootstrap will be phased out completely by CSS grid, which does essentially what bootstrap does...

I'm not a big fan of bootstrap but it does a heck of a lot more than just grid layouts. You can't just easily replace the components (modals, accordions, buttons, etc) with CSS grid.

Re: Bootstrap 5 will remove jQuery as a dependency

#24
post #9

Earlier quoted context omitted.

I know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)

Really? I'd have guessed bootstrap will be phased out completely by CSS grid, which does essentially what bootstrap does...

Bootstrap is a lot more than .row and .col ...

(Which btw is mentally a lot easier than the odd CSS grid syntax)

Re: Bootstrap 5 will remove jQuery as a dependency

#25
post #18
post #6

> Bootstrap 5 will remove jQuery as a dependency ... by copying over/rebuilding big chunks of it. - $(element).closest(`.${ClassName.ALERT}`)[0] + SelectorEngine.closest(element, `.${ClassName.ALERT}`) - $.Event(Event.CLOSE) + EventHandler.trigger(element, Event.CLOSE) - $(element).one( ... ) + EventHandler.one( ... ) - $(this).data(DATA_KEY) + Data.getData(this, DATA_KEY) And so on and so forth. DOM APIs are just as…

Yes...What were you expecting then to do? Usually you replace code if you're dropping a dependency. It's one less network request, saves bandwidth and removes obsolete and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon). Seems to be a sensible approach to me. It's like using native code rather than electron, even if you add more lines,…

> It's one less network request, saves bandwidth

Given that most stuff these days is packed together with Webpack or at least concat'd together, you don't really save much, plus jQuery in gzip'd form is clocking in at https://mathiasbynens.be/demo/jquery-size).

> and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon)

So what? Software can very well be "done", there is no need to always evolve and evolve. As long as there is no security issue left unsolved, though.

In addition, if you're rebuilding half of it on your own anyway, chances are high you'll miss some weird corner case that jQuery solved years, or decades, ago.

Re: Bootstrap 5 will remove jQuery as a dependency

#27
post #9
post #2

Which will be ready for February 2022

I know you're sarcastic but Bootstrap has been picking up steam recently. The jQuery removal has been in the work since 2017. If you want faster releases then feel free to submit PRs :)

Wondering, it there any company hiring to work on Bootstrap?

Re: Bootstrap 5 will remove jQuery as a dependency

#29
post #18

Earlier quoted context omitted.

Yes...What were you expecting then to do? Usually you replace code if you're dropping a dependency. It's one less network request, saves bandwidth and removes obsolete and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon). Seems to be a sensible approach to me. It's like using native code rather than electron, even if you add more lines,…

> It's one less network request, saves bandwidth Given that most stuff these days is packed together with Webpack or at least concat'd together, you don't really save much, plus jQuery in gzip'd form is clocking in at https://mathiasbynens.be/demo/jquery-size ). > and pretty much unmaintained code (at this point, the jQuery github is as good as dead, unlikely to see major releases any time soon) So what? Software can…

I don't agree, software needs to evolve as its dependencies does. In this case we have fetch, async/await, promises and loads more native features that jQuery hasn't adapted to (XHR is obsolete now for example).

Why include a dependency that the browser provides for free? jQuery was good before ES6/next came along, these days it's extra cruft.

And if what you're saying is true about weird corner cases, people will fix that up in PR's anyway, that's not a reason to stop innovating and just say "meh, jQuery is good enough".

Thank god most software doesn't work your way, we'd probably be stuck in the stone ages still.

Re: Bootstrap 5 will remove jQuery as a dependency

#30

Can someone explain why if you like jquery and you're used to it why is it a bad idea or it's not but just personal preference at this point?

Not a total expert, but as a fan of JQuery I've read the arguments.

JQuery modifies the DOM at runtime, this means lots of node traversals and redrawings on the fly, which make it nearly impossible for the Javascript engine to optimize anything.

More modern frameworks in general use the concept of a Shadow DOM: they keep their own representation of the DOM internally and only send the full frame to the engine for rendering. It seems to be extremely more efficient and flexible.

Post reply on HN