Replies: 5 comments 2 replies
-
Don't think it would be that tricky given we have a vanilla, framework-agnostic |
Beta Was this translation helpful? Give feedback.
-
It looks like Does anyone know if there is has been effort put towards a Svelte equivalent? I don't want to duplicate any effort. If not I'll look at kickstarting this 😊 |
Beta Was this translation helpful? Give feedback.
-
I recommend using svelte stores when doing this. Here's how I would do it: import { getAccount, watchAccount } from '@wagmi/core'
import { readable } from 'svelte/store'
export function account() {
const { subscribe } = readable(getAccount(), (set) => {
return watchAccount(set)
})
return {
subscribe,
}
} <script>
import { account } from './store/account'
</script>
{#if $account.isConnecting}
<div>Connecting…</div>
{:else if $account.isDisconnected}
<div>Disconnected</div>
{:else}
<div>{$account.address}</div>
{/if} |
Beta Was this translation helpful? Give feedback.
-
I am working on a Tauri/Vite/Svelte dapp. As I integrate wagmi/core, I'll start contributing in the examples section. Okay to create a core folder in examples (and then nested [framework] folders, |
Beta Was this translation helpful? Give feedback.
-
FYI I created this package for my own purposes https://www.npmjs.com/package/svelte-wagmi-stores Tried to keep it light as possible, would love input! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Based on this comment it looks like it should be not too tricky to put a Svelte library together.
I've started using Svelte for the first time this week and it's clear I'll be using it more and more for web3 work. But now I've lost my wagmi fun times 😿
I can help support this effort with my own 💰, I can try and convince others to support it with 💰, and with a bit of guidance of how it would work and where to start I can contribute some of my time to help coding.
Beta Was this translation helpful? Give feedback.
All reactions