halfnelson / svelte-native

Svelte controlling native components via Nativescript
MIT License
1.82k stars 78 forks source link

Support Svelte conditional classes #354

Open jasongitmail opened 11 months ago

jasongitmail commented 11 months ago

I noticed that Svelte's conditional classes like class:selected={$foo === 'abc'} are not supported. Using this causes a build error.

I've worked around this pretty easily using: class={"foo bar" + (isSelected ? ' selected' : ' ')}

So maybe it's not worth supporting, but fyi.

Thanks for building this!