You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, if we override the update method, and then have our own snapshot property, and yield that out to consumers, then we get very targeted DOM updates without re-rendering.
The text was updated successfully, but these errors were encountered:
Will need to extend Actor: https://github.com/statelyai/xstate/blob/b730b298994aa00e0a76783d747c8063853d389e/packages/core/src/createActor.ts#L64
and not use createActor just instantiates the default Actor.
However, the whole snapshot is replaced here: https://github.com/statelyai/xstate/blob/b730b298994aa00e0a76783d747c8063853d389e/packages/core/src/createActor.ts#L241
so that means we need to intercept that and deeply diff the values before assigning.
(VDOM, but it JS 🙃)
getSnapshot()
just returns the_snapshot
(which we need to intercept): https://github.com/statelyai/xstate/blob/b730b298994aa00e0a76783d747c8063853d389e/packages/core/src/createActor.ts#L747So, if we override the
update
method, and then have our own snapshot property, and yield that out to consumers, then we get very targeted DOM updates without re-rendering.The text was updated successfully, but these errors were encountered: