mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45:53 +00:00
docs: clarify xrsp danger (#28053)
This commit is contained in:
parent
05143b894f
commit
d864ba324b
@ -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