Open r2dev2 opened 2 years ago
The color prop currently isn't reactive as shown by this example in which the color doesn't switch.
<script> import { Button } from "smelte"; export let name; let color = 'primary'; const switchColor = () => { console.log('switching color'); color = color == 'primary' ? 'secondary': 'primary'; }; </script> <Button {color} on:click={switchColor}> Test Button </Button>
It would be nice if the color prop was reactive. Also, is the current non-reactivity intentional or not?
color
The color prop currently isn't reactive as shown by this example in which the color doesn't switch.
It would be nice if the
color
prop was reactive. Also, is the current non-reactivity intentional or not?