DEV Community

Discussion on: JavaScript Frameworks and Metagaming

Collapse
 
drsensor profile image
૮༼⚆︿⚆༽つ

Hi, do you have a written article on how HMR in Solid.js implemented?

Since Solid component return DOMNode instead of VNode, I wonder if I can borrow some ideas to make HMR works with ECS pattern 🤔 (commonly use in real-time game and simulator)

Collapse
 
ryansolid profile image
Ryan Carniato

HMR is quite possibly the most difficult problem Ive come across for the fine-grained approach(yes harder than Suspense and Concurrent Rendering). Its harder than hydration since no expectation of things matching. So I consider the solution incomplete. Solid only preserves state above the change. Even Svelte's HMR which does preserve the state blows out nested elements when I last checked. This is a place where VDOM diffing has an easier time.

Collapse
 
mtyson profile image
MTyson

Should have asked you about HMR :)