Skip to content

Commit

Permalink
fix: fixed incorrect accessors when using userState (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukeshP1995 committed Nov 2, 2023
1 parent b1bf303 commit fd84646
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
setContext("user", user);
</script>

<h1>Welcome back, {user.value.username}</h1>
<h1>Welcome back, {user.username}</h1>
<UserProfile />
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<div>
<h2>My Profile</h2>
<p>Username: {user.value.username}</p>
<p>Email: {user.value.email}</p>
<p>Username: {user.username}</p>
<p>Email: {user.email}</p>
<button on:click={() => (user.username = "Jane")}>
Update username to Jane
</button>
Expand Down

0 comments on commit fd84646

Please sign in to comment.