Skip to content

Conversation

@craigshoemaker
Copy link
Contributor

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests

Description

Edit pass

Use cases and why

n/a

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

The example does not work, because by default the `useStore` only sets up watches on top-level properties. To make the example work, we need to either:
1. wrap the `{count:0}` in another `useStore()` call, which is cumbersome OR
2. ask the `useStore` to apply reactivity to all properties recursively by passing the additional argument `{recursive:true}`.
The example doesn't work as is, because by default because the `useStore` function only watches top-level properties.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo here (inception anyone? 😅) - double "because"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 - grateful for the second pair of eyes!

@shairez
Copy link
Contributor

shairez commented Jul 16, 2022

Thanks again docs master! 😊💪

Other than the typo I mentioned, LGTM 🙏

The example does not work, because by default the `useStore` only sets up watches on top-level properties. To make the example work, we need to either:
1. wrap the `{count:0}` in another `useStore()` call, which is cumbersome OR
2. ask the `useStore` to apply reactivity to all properties recursively by passing the additional argument `{recursive:true}`.
The example doesn't work as is, because by default because the `useStore` function only watches top-level properties.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 - grateful for the second pair of eyes!

@shairez shairez merged commit ba4416f into QwikDev:main Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants