Repository navigation
Fix state metadata example - #525
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| Meta data is static data that describes relevant properties of a state node. You can specify meta data on the `.meta` property of any state node. This can be useful for displaying information about a state node in a UI, or for generating documentation. | ||
|
|
||
| The `state.meta` property collects the `.meta` data from all active state nodes and places them in an object with the state node's ID as the key and the `.meta` data as the value: | ||
| The snapshot's `getMeta()` method returns the `.meta` data from all active state nodes. The returned object maps each state node's ID to its metadata: |
There was a problem hiding this comment.
🔍 State overview still shows old metadata property
The state object overview still presents meta as a snapshot property. Readers following that example encounter the outdated API despite this correction.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Use
getMeta()to read metadata from active state nodes in both the state metadata example and the state snapshot overview. This carries forward the correction proposed in #416.Validation
git diff --check