Skip to content

Commit

Permalink
Revert "Update index.mdx : "javascript" to "JavaScript" (QwikDev#6780)"
Browse files Browse the repository at this point in the history
This reverts commit 4c88089.
  • Loading branch information
maiieul committed Aug 27, 2024
1 parent c48aef6 commit 33c991f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default component$(() => {
});
```
> Do you know why you should use a regular `function(){}` instead of an arrow function in `useStore()`? This is because [arrow functions don't have their own bindings to `this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) in JavaScript. This means that if you try to access `this` using an arrow function, `this.count` could point to another object's `count` 😱.
> Do you know why you should use a regular `function(){}` instead of an arrow function in `useStore()`? This is because [arrow functions don't have their own bindings to `this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) in javascript. This means that if you try to access `this` using an arrow function, `this.count` could point to another object's `count` 😱.
## Computed state

Expand Down

0 comments on commit 33c991f

Please sign in to comment.