You are using documentation jargon in your explanation that creates huge gaps in your understanding. I am talking about the lower level code. The actual code.
I don't get your point. JSX is converted into tree of objects that describe a UI that is what you call vdom. It is a representation. Render function creates the corresponding UI elements. You are mixing different things. React babel plugin converts jsx to react.createElement. If react.createElement create a dom node internally by calling document.createElement, you can not use this plugin to target other platforms that do not understand DOM. In that case, you need to use another plugin that creates correct UI element. Alternatively you can return a object from react.createElement, `{ type: 'div', { class: 'hero'}, children: [...] }`, and render function calls the document.createElement.
> if you add solid's reactivity approach, components don't re-run anymore
I just explained the issue. Speed is not a problem, you keep bringing speed. No, the problem is ergonomics. Why we have double renders, why you juggle so many things to achieve something so simple.
``` function Component() {
// We create state here
// Component re-runs when this state changes.
// UI elements are created here.. }
```
Component reacts to something it creates when it executes. This translates to:
Component executes
It creates state
It reacts to the state change, re-executes, creating a vicious circle
That is where the issue lies and that is the root of all issues in react. Issue is not using vdom, nor not using reactivity. Issue is weird execution flow.
Components do re-run in solidjs. I don't know what give you that idea. When reactive context re-executes, components re-run. And for the internal state, comopent does not need to re-run because component wraps the state, re-running causes the very same issues React suffers from.
React's mental model is not UI = f(state); they say so, but their execution flow refutes this. How does double execution produce predictability? Cross-platform abstraction has nothing to do with React; it is JSX. With the right code transformation, you can run any code on any platform. Nobody cares if React sticks to its current paradigm or not. Some of the things you said are plainly wrong. Please don't use this channel to stir controversy and spread misinformation.
View all comments
Show parent comment
1
u/snnsnn Feb 10 '26 edited Feb 10 '26
You are using documentation jargon in your explanation that creates huge gaps in your understanding. I am talking about the lower level code. The actual code.
I don't get your point. JSX is converted into tree of objects that describe a UI that is what you call vdom. It is a representation. Render function creates the corresponding UI elements. You are mixing different things. React babel plugin converts jsx to react.createElement. If react.createElement create a dom node internally by calling document.createElement, you can not use this plugin to target other platforms that do not understand DOM. In that case, you need to use another plugin that creates correct UI element. Alternatively you can return a object from react.createElement, `{ type: 'div', { class: 'hero'}, children: [...] }`, and render function calls the document.createElement.
> if you add solid's reactivity approach, components don't re-run anymore
I just explained the issue. Speed is not a problem, you keep bringing speed. No, the problem is ergonomics. Why we have double renders, why you juggle so many things to achieve something so simple.
```
function Component() {
// We create state here
// Component re-runs when this state changes.
// UI elements are created here..
}
```
Component reacts to something it creates when it executes. This translates to:
That is where the issue lies and that is the root of all issues in react. Issue is not using vdom, nor not using reactivity. Issue is weird execution flow.
Components do re-run in solidjs. I don't know what give you that idea. When reactive context re-executes, components re-run. And for the internal state, comopent does not need to re-run because component wraps the state, re-running causes the very same issues React suffers from.