-
Notifications
You must be signed in to change notification settings - Fork 26
Example using Svelte 5 runes for state management #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example using Svelte 5 runes for state management #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! One small change and we'll get this merged.
Edit: Also looks like you need to fix conflicts in the lockfile. git fetch && git merge origin/main && git checkout origin/main pnpm-lock.yaml && pnpm i --ignore-scripts
should do all that for you
2f3f34a
to
a6d8935
Compare
a6d8935
to
7a4ff98
Compare
Co-authored-by: willow <42willow@pm.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this!
I adapted it for my use-case and it's been great :)
https://github.com/schooltape/schooltape/blob/v4/src/utils/state.svelte.ts
Example using Svelte 5 runes for state management (wxt-dev#21)
Description
Demonstrates how the browser.storage API allows different parts of the extension share state and reflect activity on the current page.
counterState.state
It's inspired by the existing Custom Svelte Store example, but using Svelte 5 and runes, addressing #14
Additionally demonstrates how to communicate with the active page.