Skip to content

Commit

Permalink
Update index.mdx : "javascript" to "JavaScript" (QwikDev#6780)
Browse files Browse the repository at this point in the history
Update index.mdx
  • Loading branch information
yurovant authored Aug 9, 2024
1 parent 5ddf269 commit 4c88089
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 4c88089

Please sign in to comment.