Live data from Hacker News

Bootstrap 5 will remove jQuery as a dependency

github.com

291–300 of 333 posts

Re: Bootstrap 5 will remove jQuery as a dependency

#292

Earlier quoted context omitted.

Just curious, what's your opinion on their decision to remove the headphone jack?

That's one of the post Apple Computer decisions that bugs me. I'm a relic and like my headphones with wires attached. My wired cans have this unique feature of not needing to be recharged.

That’s what people would’ve felt about floppys. I can say I don’t really care about the removal of headphone jack. But I’m not assuming most people feel that way.

Re: Bootstrap 5 will remove jQuery as a dependency

#293

Earlier quoted context omitted.

You misread the post I was responding to. They remarked that because IE itself was "dropped" that new products, including Bootstrap 5 need not support it. > IE itself is being "dropped" as well, so long term support commitment for new products does not make sense.

I did read that as "Support for IE is being dropped from Bootstrap", not the way you interpreted it.

The OP was def saying IE itself is being dropped. Unless we are talking about a different comment.

Re: Bootstrap 5 will remove jQuery as a dependency

#294

Earlier quoted context omitted.

I am going to root for bloated jQuery to save my life! $('.tpm_sensors').forEach(function(sensor) { if (sensor.pressure vs: var tpm_sensors = document.getElementsByClassName('tpm_sensors'); for (var i = 0, len = tpm_sensors.length; i < len; i++) { var sensor = tpm_sensors[i]; if (sensor.pressure < threshold) fixBeforeIDie(); }

document.querySelectorAll('.tpm_sensors').forEach((sensor) => {if (sensor.pressure < threshold) { fixBeforeIDie(); }});

Then this breaks in older browsers because forEach isn't a method on a NodeList. So you have to polyfill in features to do [...document.querySelectorAll('.tpm_sensors')].forEach(...);

Re: Bootstrap 5 will remove jQuery as a dependency

#295
post #39

This PR is massive and represents a year and a half of work. If you look at the comments you see there are loads of browser-specific issues being fixed. IE support was dropped as they didn't feel making stuff compatible (jQuery did that for them before). The API is also incompatible; in the words of one dev: "we broke everything". As one of the commenters pointed out, a lot of stuff was copied from jQuery to make it…

so the big reason here is actually React. Whether you like it or not, the developer momentum behind React/Vue is massive. And jquery works in weird ways with React/Vue. You can still make it work, but people are choosing to go with other frameworks. so the removal is not really a "remove jquery" thing - but more of "make sure the framework javascript doesnt screw up react". For example, look at some of the earliest c…

What does jQuery do to play poorly with React that this reimplementation doesn't?

Re: Bootstrap 5 will remove jQuery as a dependency

#297

Earlier quoted context omitted.

so the big reason here is actually React. Whether you like it or not, the developer momentum behind React/Vue is massive. And jquery works in weird ways with React/Vue. You can still make it work, but people are choosing to go with other frameworks. so the removal is not really a "remove jquery" thing - but more of "make sure the framework javascript doesnt screw up react". For example, look at some of the earliest c…

What does jQuery do to play poorly with React that this reimplementation doesn't?

I have used jQuery in a React app without issues. It is no worse than making direct DOM calls.

React is great for rendering, but you can’t implement direct-manipulation on top of virtual DOM. Direct-manipulation means interactively resizing, drag & drop and so on. To implement this you need to know the position and size of real DOM elements. There is no "React way" to query the position and size of elements, so interactivity has to be implemented the old-school way, by interacting with real DOM. You can call native DOM methods to do this, but jQuery makes it easy. There are lots of shortcuts in jQuery. You can certainly do it without jQuery too, but unless reducing download size by around 85KB is very important to you, there is no reason you shouldn’t take advantage of the ease-of-use of jQuery.

Keep in mind that once you manipulate DOM directly (using jQuery or not) React can’t update those elements. For more on this look up "Integrating with Other Libraries" in React documentation.

Re: Bootstrap 5 will remove jQuery as a dependency

#298
post #201

Earlier quoted context omitted.

Safari shards their cache by first party domain, so you don't get that caching benefit there.

Didn't know that. Looks like Safari is continuing it's devolution into becoming the next IE.

It's a privacy thing. I expect we'll see Firefox and Chrome sharding cache as well.

Re: Bootstrap 5 will remove jQuery as a dependency

#299
post #145

Earlier quoted context omitted.

GitHub is a terrible metric. You probably use tools like grep and ls many times a day... you do not check if ls is up to modern standards and has a constant stream of issues and fixes. You don’t do it for grep, or git...you depend on git. You cannot apply instant gratification to software library dev. If the work for a library was done and satisfied in 2015, then it’s fucking done. It’s tried and tested. It gets secu…

There's no such thing as "done" software. Your view is incompatible with reality, I'm afraid. Yes, I did check whether ls was still actively being developed, saw that it wasn't doing anything new, and switched to exa, which is a fantastic little project, with sane defaults, less cruft, and greater speed. You can always improve software, some people just get bored of doing so, and then declare it "done". But it isn't,…

Is whatever benefit you see worth the hassle when sharing scripts or setting up servers?

Re: Bootstrap 5 will remove jQuery as a dependency

#300

Earlier quoted context omitted.

What does jQuery do to play poorly with React that this reimplementation doesn't?

I have used jQuery in a React app without issues. It is no worse than making direct DOM calls. React is great for rendering, but you can’t implement direct-manipulation on top of virtual DOM. Direct-manipulation means interactively resizing, drag & drop and so on. To implement this you need to know the position and size of real DOM elements. There is no "React way" to query the position and size of elements, so inter…

> There is no "React way" to query the position and size of elements, so interactivity has to be implemented the old-school way, by interacting with real DOM.

I have helped build an interactive timeline web app where we explicitly placed elements on the page and moved them around based on user interactions. We did this with react and no jquery.

>React is great for rendering, but you can’t implement direct-manipulation on top of virtual DOM. Direct-manipulation means interactively resizing, drag & drop and so on.

There are react "drag and drop" libraries that have no dependency on jquery and don't break the react lifecycle for the elements. For example https://github.com/react-dnd/react-dnd

Maybe i'm not following what you are saying but I haven't encountered something that required me to use jquery and I've built some pretty ambitious interfaces.

Post reply on HN