feat: add useStore and useHooks composables that provide default store/hooks

This commit is contained in:
Braks
2021-10-20 22:39:54 +02:00
parent 61dc9dea33
commit b2b1fe822f
27 changed files with 174 additions and 128 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
import Node from '~/components/Nodes/Node.vue'
import { NodeType, Node as TNode } from '~/types'
import { getNodesInside } from '~/utils/graph'
import { Store } from '~/context'
import { useStore } from '~/composables'
interface NodeRendererProps {
nodeTypes: Record<string, NodeType>
@@ -10,7 +10,7 @@ interface NodeRendererProps {
const props = defineProps<NodeRendererProps>()
const store = inject(Store)!
const store = useStore()
const getNodes = computed(() =>
store.onlyRenderVisibleElements