News for hackers. Stuff that matters.
Re:jQuery v4.0 Beta by treflop on Tuesday February 06, 2024 @10:48PM (#39284259)
I’m a big fan of React and jQuery but it sounds like you’re not using jQuery right.

All my jQuery components were self contained and you just initialized them with $(‘[data-date-picker]’).datePicker(). It is pretty obvious to anyone looking at the code that if you remove “data-date-picker”, it stopped being a date picker.

Re:jQuery v4.0 Beta by erhaetherth on Tuesday February 06, 2024 @11:08PM (#39284390)
Then you have dumb stuff like if you check a box and want some additional form fields, you have to inject a div or input into the DOM manually, and then make sure you initialize your datepicker, but maybe there will be a flash of unpickerified input if you don't do it right.
Re:jQuery v4.0 Beta by spiderice on Wednesday February 07, 2024 @12:54AM (#39284991)
I haven’t used jquery in 10 years or so, but I’m pretty sure this isn’t what you would do. You would just hide or unhide the inputs with jquery.
Re:jQuery v4.0 Beta by Capricorn2481 on Tuesday February 06, 2024 @10:57PM (#39284315)
That is true, but this is built-in to React and it's optional for JQuery. I am working on legacy projects a lot and nobody ever writes JQuery like this outside of famous libraries.