News for hackers. Stuff that matters.
Re:Web Components Will Outlive Your JavaScript Framework by breadwinner on Wednesday October 25, 2023 @02:59PM (#38016822)
> since you can't pass complex objects as attributes like you can in jsx

But you can!

Here's an example of passing complex objects as attributes (look for zx-listeditor): https://github.com/wisercoder/uibuilder/blob/master/WebCompo...

And here's the web component itself: https://github.com/wisercoder/uibuilder/blob/master/WebCompo...

And here's the tiny (500-line) lib that enables it: https://github.com/wisercoder/uibuilder/#jsx-for-web-compone...

Re:Web Components Will Outlive Your JavaScript Framework by crooked-v on Wednesday October 25, 2023 @03:15PM (#38016984)
"You can pass complex objects using web components, if you also use something other than web components" isn't really all that much of a defense of web components.
Re:Web Components Will Outlive Your JavaScript Framework by breadwinner on Wednesday October 25, 2023 @03:38PM (#38017258)
It is 223 lines of code: https://github.com/wisercoder/uibuilder/blob/master/dist/uib...

You object to this tiny amount of code?

Re:Web Components Will Outlive Your JavaScript Framework by skrebbel on Wednesday October 25, 2023 @04:02PM (#38017556)
How do you make this work with frameworks like Svelte which, when server side rendering, cast all props to string (!) attributes?
Re:Web Components Will Outlive Your JavaScript Framework by breadwinner on Wednesday October 25, 2023 @04:26PM (#38017896)
That should be an easy bug fix in Svelte.