Skip to content

Commit

Permalink
Update a few Svelte 5 examples (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorejb committed Nov 16, 2023
1 parent 02b5a0f commit 4e46721
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
</script>

<button on:click={nextLight}>Next light</button>
<button onclick={nextLight}>Next light</button>
<p>Light is: {light}</p>
<p>
You must
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import { setContext } from "svelte";
import UserProfile from "./UserProfile.svelte";
import createUserState from "./createUserState.js";
import createUserState from "./createUserState.svelte.js";
// In a real app, you would fetch the user data from an API
const user = createUserState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<h2>My Profile</h2>
<p>Username: {user.username}</p>
<p>Email: {user.email}</p>
<button on:click={() => (user.username = "Jane")}>
<button onclick={() => (user.username = "Jane")}>
Update username to Jane
</button>
</div>

0 comments on commit 4e46721

Please sign in to comment.