Astro Info
The issue is about incorrect example in the docs and it is not related to Astro.
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Description
The README example shows incorrect destructuring from useStoreValue. The tags property is nested under meta, but the example destructures it at the top level.
What's the expected result?
Store Structure
const documentStore = store({
title: "Untitled",
authors: ["Ada", "Ben"],
meta: {
pages: 3,
tags: ["draft", "internal"],
},
});
Current (Incorrect) Code
const { title, tags } = useStoreValue(documentStore);
Expected (Correct) Code
Destructure nested property:
const { title, meta: { tags } } = useStoreValue(documentStore);
Impact
This may confuse new users about how to properly access nested store properties.
Location
README.md - Usage example section
Link to Minimal Reproducible Example
http://no-example.com
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Description
The README example shows incorrect destructuring from
useStoreValue. Thetagsproperty is nested undermeta, but the example destructures it at the top level.What's the expected result?
Store Structure
Current (Incorrect) Code
Expected (Correct) Code
Destructure nested property:
Impact
This may confuse new users about how to properly access nested store properties.
Location
README.md - Usage example section
Link to Minimal Reproducible Example
http://no-example.com
Participation