Skip to content

Any way to force reactivity like in Svelte 4? #13772

Answered by brunnerh
raythurnvoid asked this question in Q&A
Discussion options

You must be logged in to vote

You should be able to wrap it in an object to cause updates.

let matrix = $state.raw({ value: new DOMMatrix(...) });
// ...
function multiplyMatrices() {
  matrix.value.multiplySelf(/* ... */);
  matrix = { ...matrix };
}

Related issue:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@raythurnvoid
Comment options

Answer selected by raythurnvoid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants