Skip to content

Commit

Permalink
docs: add watch effect to example
Browse files Browse the repository at this point in the history
  • Loading branch information
tien committed Oct 18, 2024
1 parent f511e04 commit 8aa1aef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/vue/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ import {
provideChain,
useChainIds,
useQueryErrorResetter,
watchMutationEffect,
} from "@reactive-dot/vue";
import { onErrorCaptured, ref } from "vue";
const chainIds = useChainIds();
const selectedChainId = ref<ChainId>("polkadot");
const hasError = ref(false);
provideChain(selectedChainId);
const hasError = ref(false);
const resetError = useQueryErrorResetter();
onErrorCaptured(() => (hasError.value = true));
provideChain(selectedChainId);
// Useful tracking all submitted transaction, i.e. for toast notification
watchMutationEffect((event) => console.log(event));
</script>

<template>
Expand Down

0 comments on commit 8aa1aef

Please sign in to comment.