Route to DOM with wasm-unknown-unkonwn

My understanding is that react has a virtual dom which you can update and then it figures out the deltas and only applies the changes to the real dom. Would that strategy work well if the virtual dom was in wasm? (Excuse my ignorance of wasm/react/js :slight_smile: )

Please understand that React is only an improvement relative to frameworks that needlessly recreate DOM. Relative to just changing the right parts of the DOM manually there is still considerable overhead in React.

You could certainly build a virtual DOM with wasm, if you do it well it might be faster than the React virtual DOM. But you still have the awkward interaction with JavaScript to do the actual work on the DOM. Overall the speed difference between React and a hypothetical “React-wasm” would probably be small, and both would be slower than manual DOM manipulation written in JavaScript.

Yes so react allows you to redraw your ui on every tick without actually changing the DOM.