Live data from Hacker News

jQuery 3.0 Release Candidate

blog.jquery.com

61–70 of 71 posts

Re: jQuery 3.0 Release Candidate

#61

Earlier quoted context omitted.

I hear you on this. A lot of that stack is very new and still changes quickly enough that I have a hard time finding good examples to work from. I've had a very hard time getting things like react+react-router+reflux to all work together as expected. It's not been super fun as a way of working. And I dunno if your situation is the same as mine, but all the "contemporary" JS stuff I work with (react, etc) is for side…

Our situations are very similar. For me it's just a way to play with React. I don't expect to use it at work or to make me any money.

I do expect to use it for my work.

But at this rate it seems like it needs to mature a bit and settle down before I should use it.

Re: jQuery 3.0 Release Candidate

#62

Earlier quoted context omitted.

+1 for fetch. Use the good github fetch polyfill for old browsers https://github.com/github/fetch

I tried fetch, the polymorphic-fetch module that builds on this github one and found it doesn't support .finally(), or work with the promise.finally polyfill (yes I know it's not in the spec, but seriously). Also sinon.js couldn't mock it, and dealing with error cases is inelegant (it doesn't look like much extra code, but is hard to justify if you're just writing a small component that hits one endpoint, in terms of…

Why you want stuff which is not in the spec? It's not in the spec it's not in the polyfill :/ Why the fetch from Github is not good enough for you?

Re: jQuery 3.0 Release Candidate

#63
Since the oldest supported version of IE is now 11:

http://youmightnotneedjquery.com/

"jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.

"If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency. Maybe you can include a few lines of utility code, and forgo the requirement. If you're only targeting more modern browsers, you might not need anything more than what the browser ships with."

Re: jQuery 3.0 Release Candidate

#64

Earlier quoted context omitted.

I tried fetch, the polymorphic-fetch module that builds on this github one and found it doesn't support .finally(), or work with the promise.finally polyfill (yes I know it's not in the spec, but seriously). Also sinon.js couldn't mock it, and dealing with error cases is inelegant (it doesn't look like much extra code, but is hard to justify if you're just writing a small component that hits one endpoint, in terms of…

Why you want stuff which is not in the spec? It's not in the spec it's not in the polyfill :/ Why the fetch from Github is not good enough for you?

Because needing to do something regardless of success or failure is incredibly common (e.g. stop a progress bar, re-enable form inputs & buttons).

The (promises) spec is lacking w.r.t. this use-case, and most ajax libraries (and a lot or promise libraries) recognise this by implementing a 'finally' equivalent.

Re: jQuery 3.0 Release Candidate

#66

Since the oldest supported version of IE is now 11: http://youmightnotneedjquery.com/ "jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application. "If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency. Maybe you can include a few lines of utility code, and forgo the requirement. If you're only…

According to the upgrade guide (https://jquery.com/upgrade-guide/3.0/#browser-support), jQuery 3 still supports IE 9+, not 11+.

Re: jQuery 3.0 Release Candidate

#68
post #20

Earlier quoted context omitted.

I've often head this and it would probably be in my next-side project. Do you have an AJAX API bundled with D3 or are you using some custom functions ?

you can use whatwg-fetch instead of jquery ajax

native fetch is not available in IE<11

Re: jQuery 3.0 Release Candidate

#70

Earlier quoted context omitted.

And, why should a new developer on fresh projects use it? It seems ES6 and latest CSS specs should cover everything JQuery used to be used for. Plus, wouldn't actually using Vanilla JS be faster? Right now it looks like people use JQuery for legacy code. But, they give no reason to use it for new projects, except if they need it for other libraries they're going to use. (based on legacy code anyways...) JQuery looks…

jQuery is still much more pleasant to use than native methods when working with collections of DOM elements. If you do much DOM manipulation, you'll end up writing helpers that replicate aspects of jQuery to grease your workflow. The real issue is that trying to manage state by directly manipulating the DOM becomes a nightmare as the project grows, and newer frameworks can mostly take care of that for you. So jQuery…

agreed, if you want to keep things simple jQuery is still a nice tool and ES6 only makes it nicer to type, ES6 does not improve native DOM manipulation
Post reply on HN