Replacement of $$props.class in svelte 5 #11080
|
I was trying svelte 5 preview and I am wondering how can I access the class prop passed to a component. I tried this but it is giving me some typescript errors |
Answered by
Conduitry
Apr 6, 2024
Replies: 2 comments
|
|
0 replies
Answer selected by
Conduitry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let { class } = $props()is invalid javascript (and typescript). You can uselet { class: className } = $props()or any other name you want that's a valid JS identifier name.