ES6 over jQuery
unruledboy opened this issue ยท 17 comments
One of the beauties of this project is to have minimum dependency, if we can use ES6 APIs to replace jQuery, it would be even more slim.
Like Element.querySelector
over 1 element $('selector')
, or Element.querySelectorAll()
for multiple element $('selector')
.
I am strongly interested to know if jQuery will be replaced by future js in future releases
That's definitely something that would greatly improve the library. I made it with jQuery for ease, but ES6 would remove all dependencies, making it even more minimal indeed. Going to look into it!
I propose to create a new issue with list of next features to add. people could also submit their ideas in comments.
This resource can help: http://youmightnotneedjquery.com/
Uncaught TypeError: Cannot read property '0' of undefined
at HTMLDivElement.e (flowy.min.js:1)
at HTMLDocument.dispatch (jquery.min.js:2)
at HTMLDocument.v.handle (jquery.min.js:2)
TypeError: t.targetTouches is undefined264 flowy.min.js:1:11842
Uncaught TypeError: Cannot read property '0' of undefined
at HTMLDivElement.e (flowy.min.js:1)
at HTMLDocument.dispatch (jquery.min.js:2)
at HTMLDocument.v.handle (jquery.min.js:2)
TypeError: t.targetTouches is undefined264 flowy.min.js:1:11842
Fixed those issues, was a small typo.
Did you begin to work on this @alyssaxuu ? I'm interested in fixing this issue in the two days comin'.
I like your work btw.
Did you begin to work on this @alyssaxuu ? I'm interested in fixing this issue in the two days comin'.
I like your work btw.
I've been working on it, although I've been a bit busy.
I can help you if you need any help. Definitely interested in removing jquery altogether.
I can help you if you need any help. Definitely interested in removing jquery altogether.
Feel free to contribute ^^ I haven't really done much progress with it yet since I don't have the time for it right now, I could dive into it this weekend.
https://github.com/google/closure-library/tree/master/closure/goog can be another resource for good and wide-compat code :)
How can we split tasks? ๐ค
I've begin to work on my fork. I've start cleaning the code, begin to use ES6 features, but not yet moving from JQuery to plain javascript. I guess we could define some types of JQuery calls, group them by category and each of us takes care on his category, what do you think about that ?
I think we can do that: splitting the features to make it easier to collaborate.
Code can be written in ES6 then ported back to ES5 using the Babel transpiler.
So I'm not that great at javascript, but I have a lot of time on my hands so I did my best at converting to ES6. There are some issues with alignment that are probably happening due to my inexperience, but hopefully it's useful to you. My fork
The project officially has no dependencies - got rid of jQuery! Thanks everyone for your contributions :)