News for hackers. Stuff that matters.
Re:React as a UI Runtime by crooked-v on Sunday February 03, 2019 @05:51AM (#19068904)
From what I understand, Web Components and Polymer have a ton of fundamental limitations, starting with how data in a component tree is bound to the DOM as strings, so for anything even mildly complicated you have to roll your own JSON.parse / JSON.stringify handling into every component and have to deal with the DOM parsing exploding if you dump too much data into it.
Re:React as a UI Runtime by ergo14 on Sunday February 03, 2019 @10:07AM (#19069915)
"component tree is bound to the DOM as strings" You can pass data as props instead of attrs, same as with react - https://github.com/Polymer/lit-element. I wonder why this pop's up all the time.

It is true that polymer had quite a bit of limitations, but there are other solutions like stencil, lit-element, svelte or vue (yes it can output WC's) that do not have those problems.

Lit-html in latest version I think is only outperformed by inferno from popular solutions.

Re:React as a UI Runtime by crooked-v on Sunday February 03, 2019 @03:07PM (#19071879)
That's still converting attributes to/from DOM strings, which seems likely to end up in bad places once you've got a huge amount of data.
Re:React as a UI Runtime by ergo14 on Monday February 04, 2019 @05:21AM (#19075180)
Here - https://jsfiddle.net/ae3bjk7g/14/ Since this show on HN all the time. Here is an example where Web Components pass a FUNCTION as a property to eachother to demonstrate its not strings/JSON. Hopefully this clears things up for you. Cheers!
Re:React as a UI Runtime by ergo14 on Sunday February 03, 2019 @04:34PM (#19072379)
Where did you get this information from?

This is not true, there is no string conversion. There is even separate syntax for setting props vs attrs.

Check out the readme here.

https://github.com/Polymer/lit-element

I also normally use redux in my WC applications.