Skip to content

Svelte4 to Svelte5 Upgrade Reactivity #12501

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

You must be logged in to vote

You are messing with props that are not $bindable, would not recommend that. Such properties are not deeply reactive.

Would either store the additional column data separately (e.g. in a map) or create a separate state variable, e.g.

const extendedColumns = $state(columns.map(...));

(If columns can change during the life of the component, you may need to combine this with $derived or use an $effect.)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ananduremanan
Comment options

@brunnerh
Comment options

Answer selected by ananduremanan
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