Skip to content

Commit

Permalink
Revert "Revert "Update index.mdx : "javascript" to "JavaScript" (Qwik…
Browse files Browse the repository at this point in the history
…Dev#6780)""

This reverts commit 629a2ee.
  • Loading branch information
maiieul committed Aug 27, 2024
1 parent 5ab1ed6 commit 916e29f
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 916e29f

Please sign in to comment.