Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 21, 2022
1 parent fe615d1 commit b834be2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/content/2.guide/2.features/6.state-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Nuxt provides `useState` composable to create a reactive and SSR-friendly shared
`useState` only works during `setup` or [`Lifecycle Hooks`](https://vuejs.org/api/composition-api-lifecycle.html#composition-api-lifecycle-hooks).
::
::alert{type=warning}
Because the data inside `useState` will be persisted from server to client, it is important that it does not contain anything that cannot be serialized to JSON, such as a class or function.
Because the data inside `useState` will be serialized to JSON, it is important that it does not contain anything that cannot be serialized, such as classes, functions or symbols.
::

## Best practices
Expand Down
2 changes: 1 addition & 1 deletion docs/content/3.api/1.composables/use-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ useState<T>(key: string, init?: () => T | Ref<T>): Ref<T>
* **T**: (typescript only) Specify the type of state

::alert{type=warning}
Because the data inside `useState` will be persisted from server to client, it is important that it does not contain anything that cannot be serialized to JSON, such as a class or function.
Because the data inside `useState` will be serialized to JSON, it is important that it does not contain anything that cannot be serialized, such as classes, functions or symbols.
::

::ReadMore{link="/guide/features/state-management"}
Expand Down

0 comments on commit b834be2

Please sign in to comment.