Created
June 25, 2021 16:44
-
-
Save cabreraalex/d63a6ecbc797d8d2aeaf3aec9846fe0c to your computer and use it in GitHub Desktop.
widget-svelte-stores
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare stores with their associated Traitlets here. | |
export const value = WidgetWritable<string>('value', ''); | |
export const count = WidgetWritable<number>('count', 0); | |
// Set the model for each store you create. | |
export function setStoreModels(model: DOMWidgetModel): void { | |
value.setModel(model); | |
count.setModel(model); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment