UNPKG
@u3u/vue-hooks
Version:
latest (2.0.1)
2.0.1
2.0.0
1.4.0
1.3.0
1.2.0
1.1.1
1.1.0
1.0.1-alpha
1.0.0
1.0.0-alpha
⚡️ Awesome Vue Hooks
github.com/u3u/vue-hooks
u3u/vue-hooks
@u3u/vue-hooks
/
esm
/
useStore.js
8 lines
(7 loc)
•
243 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ computed }
from
'@vue/composition-api'
;
import
{ getRuntimeVM }
from
'./util/runtime'
;
export
default
function
useStore
(
) {
var
vm =
getRuntimeVM
();
var
store =
computed
(
function
(
) {
return
vm.
$store
; });
return
store; }