mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
docs: clarify xrsp danger (#28053)
This commit is contained in:
parent
b8b1fab8ea
commit
b865cc511f
@ -24,7 +24,7 @@ Read more about `useState` composable.
|
|||||||
|
|
||||||
::warning
|
::warning
|
||||||
Never define `const state = ref()` outside of `<script setup>` or `setup()` function.<br>
|
Never define `const state = ref()` outside of `<script setup>` or `setup()` function.<br>
|
||||||
Such state will be shared across all users visiting your website and can lead to memory leaks!
|
For example, doing `export myState = ref({})` would result in state shared across requests on the server and can lead to memory leaks.
|
||||||
::
|
::
|
||||||
|
|
||||||
::tip{icon="i-ph-check-circle-duotone"}
|
::tip{icon="i-ph-check-circle-duotone"}
|
||||||
|
Loading…
Reference in New Issue
Block a user