Skip to content

Replacement of $$props.class in svelte 5 #11080

Closed Answered by Conduitry
Sajeesh007 asked this question in Q&A
Discussion options

You must be logged in to vote

let { class } = $props() is invalid javascript (and typescript). You can use let { class: className } = $props() or any other name you want that's a valid JS identifier name.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Conduitry
Comment options

You must be logged in to vote
0 replies
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