Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballyama committed May 29, 2023
1 parent 2c57127 commit 05f8917
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- message: Do not call setContext except during component initialization.
line: 5
column: 7
suggestions: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script>
import { setContext, onMount } from "svelte"
const something = () => {
const inner = () => {
setContext("answer", 42)
}
inner()
}
something()
</script>

{#if something()}
<button>Click Me</button>
{/if}

0 comments on commit 05f8917

Please sign in to comment.