Skip to content

Commit

Permalink
Update 02-$state.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Good Dev Student authored Jan 2, 2025
1 parent f7f87dc commit b6f4218
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion documentation/docs/02-runes/02-$state.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,15 @@ let person = $state.raw({
age: 49
});

// this will have no effect
// this will have no effect EDIT this line incorrect actualy here the console .log
person.age += 1;

we see the age is 50 !!!

![image](https://github.com/user-attachments/assets/e5ac841f-747e-468b-aabd-dd0680af4605)



// this will work, because we're creating a new person
person = {
name: 'Heraclitus',
Expand Down

0 comments on commit b6f4218

Please sign in to comment.