The vdom and batching updates is slow, the theory behind it that direct manipulation of the dom is worse has been pretty conclusively shown to be incorrect, especially with css "contains".
JSX doesn't end up bringing much value over vanilla html, but can lead to a lot of strange and difficult to reason about states.
The "execute everything on every render" style ends up being extraordinarily costly and not particularly beneficial, especially when you add something like redux to the mix.
Alternately, web components have a simple, lightweight and easy to understand life cycle.
Reactivity is trivially implemented via property setters and a call to a render() method.
Tiny, fast rendering libraries like lit-html work great, and for other components you can do without them completely, depending on the needs of the component.
React needs at least one build step, which distances the developer's code from what executes.
Vanilla web components are simple to wrap into framework components for pretty much any framework, and can be used natively by most.
React components are limited to react things, unless you want to include an absurd js payload size.
And "just use react" doesn't really mean anything. What version? With what methodology? Hooks? Class based? Look at how much it's changed. It's very costly for organizations to get caught up in the framework upgrade cycle.
There's a reason why Ionic chose to base their components on native web components. I recommend you read about it.
> JSX doesn't end up bringing much value over vanilla html
> Tiny, fast rendering libraries like lit-html work great,
It's always funny to me how people bash JSX and then praise lit-html that literally has things like ?value and .click that it parses from strings using regexps, but it's somehow "better than react because native web standards".
And lit in general is busy re-inventing react (working on context API as we speak).
I think the Context proposal is rather "send function to data" style data flow. (there's another one, more like plain client-server data flow; req-res) Not really "prop drilling" like its docs say.
I guess `.value` | `@click` is pretty much all tag template literal based libs do. The static parts need parsing, right? Though regex would be slow (if they do), a tiny parser would suffice.
You either provide a custom DSL and embrace it or you claim to be "native standards" and bash JSX.
As far as I understand it's no longer just static parts either. Can't properly test this on mobile, but it looks like function calls like classMap or styleMap are only allowed in certain locations of the code, so it's already JSX-level (or more) manipulation.
The vdom and batching updates is slow, the theory behind it that direct manipulation of the dom is worse has been pretty conclusively shown to be incorrect, especially with css "contains".
JSX doesn't end up bringing much value over vanilla html, but can lead to a lot of strange and difficult to reason about states.
The "execute everything on every render" style ends up being extraordinarily costly and not particularly beneficial, especially when you add something like redux to the mix.
Alternately, web components have a simple, lightweight and easy to understand life cycle.
Reactivity is trivially implemented via property setters and a call to a render() method.
Tiny, fast rendering libraries like lit-html work great, and for other components you can do without them completely, depending on the needs of the component.
React needs at least one build step, which distances the developer's code from what executes.
Vanilla web components are simple to wrap into framework components for pretty much any framework, and can be used natively by most.
React components are limited to react things, unless you want to include an absurd js payload size.
And "just use react" doesn't really mean anything. What version? With what methodology? Hooks? Class based? Look at how much it's changed. It's very costly for organizations to get caught up in the framework upgrade cycle.
There's a reason why Ionic chose to base their components on native web components. I recommend you read about it.