How to create shallowRefs from store #2343
-
Hi there, At the moment we have a large store of data which we store in indexedDB, we use vue-use to create this into a ref inside store, and then use storeToRefs, I was wondering how we can create a shallowRef from a store? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
lukeromanowicz
Aug 21, 2024
Replies: 1 comment
-
Hello, Pinia supports both ref and shallowRef. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, Pinia supports both ref and shallowRef.
Example:
https://play.pinia.vuejs.org/#eNqdVE1vGjEQ/SvWXiBKWIdSpRIFRFvl0B6aKslxL8vuACZe27JnCRXa/96xlw9DqxD1ZnvePL95Hs82+WJMuq4hGSYjV1hhkDnA2jCZq8U4S9BlySRTojLaItsyh9rCs36EuWMNm1tdMdYxQom88zmGLXMp9SvB9qgOXXICqR08ebIDIOWFrhWCTdF1MpWpQiuHTOoilw+zFRTIxhFxd5spxuZaD9ltppqrY0bQSNj9Dd0otqtgx9d4xmNF3bC+IpWZGvHWDiqeNgiVkTkC7RgbGQsTBGLrD/1+u400Nk2AcI8Jq1mNqBWbFlIUL+RohE1J/fU1GVybksiZsdqAxd8j3iZdJCD529aCM1Z2zfrNkViHwCnt0p4V82FXTGTQxWIi7P8VE7/GoZgz1kvFjHj0PMlN0rZYr8pNunJaUWuHVsl2AeroIQsn/iz0rj/JEh7WKbiqN7P61VEnrgh8s4dOqYV5CWvUWrpebkSbtkQ0bsh5USrClyDF2qYKkCtT8b9ypnfpXdrnUsw4XcSFKmFzeg1l9Eqo3sO+h05v0/7H9FNgXQ92pJVn9aT0iA3Zgo6+wFwszkwpdGWEBPtgUNAXOTEn/LUf4Qx…