-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate Dependency on jQuery - Tasklist #3981
Comments
Looks good. We can probably start with http://youmightnotneedjquery.com. @avalanche1 How familiar are you with this codebase? Is jQuery mostly used for animations, or is it used for all kinds of DOM manipulation, etc? |
I'm only a user of a few modules, not an active contributor. Jack is the expert here. |
It could be worth looking what @hallister and @asvetliakov have done for eliminating the jQuery dependency in semantic-react. |
I was talking to @jlukic before about dropping jQuery from SUI ... it is basically not going to happen. The JS module code is heavily dependent on jQuery. I learnt to live with it. |
What about migrating to jqLite first? This way, the first step would be to replace DOM accessors. Angular users would benefit from it I guess. |
Problem with migrating to jqLite is that it is possible to hit the problem of missing implementation. It migth not be the easies but moving to vanila js or maybe TypeScript (my preference) seems like a proper way. Looking at the code is all modules, splited into separet files, so taking module by moduels should be achivable. It might require to leave the jQuery wrapping until all work is done. Edited: |
Adding our React implementation to this list, Stardust :) My previous comment on a related thread:
|
@avalanche1: I mean typescript, I have edited my previus post. @levithomason: it is great, but what is a point of moving from jQuery to React? People which are using any other framework than React might have problems. I think that possible solution is to add a thin layer to allow the use of differenet frameworks, similair solution to angular ones. |
My comment was in regard to #3981 (comment)
For those looking for a React implementation of SUI. Since no matter the choice of JS SUI uses for DOM manipulation, it will always be incompatible with React's virtual DOM. |
@levithomason Glad you're going fine with stardust 😃 |
Moving to "react" would be kind of bad for a lot of people. |
To clarify, the React components are not intended to help non-react apps. They are required for React apps as vanilla JS and jQuery DOM manipulations do not work in React. |
Maybe something tiny like https://umbrellajs.com/ (I'm not affiliated) could handle this. Umbrella is mostly jQuery compatible, and would not also bring on the pain of recreating everything jQuery had been doing. @franciscop - any interest? |
@alanguir thanks for proposing my library and yes, I'd be really interested. Though I have to ask first, what is the reason to remove jQuery? And is jQuery available for people using the library or just used internally? Umbrella's codebase is really modular though many modules are tightly coupled (to optimize for size) so you could just remove some parts if they are not needed. It stands at 3kb min+gzip right now. Some functions might also be missing so if it makes sense I'd be willing to implement them inside umbrella or as a separate file. PS, great work with Semantic UI, I have known it for a while and I love it |
As chamadas ao jquery no semantic são estas:
It also uses $.fn a lot. I used this script to build the list:
Semantic-ui clearly uses very few jquery functions. Maybe lodash + axios + "some events library"? could supply all that semantic-ui needs with just enough fat to the side. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
The text was updated successfully, but these errors were encountered: