jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.64k stars 721 forks source link

Cannot access vuex store from inside of a node component, is there a work around ? #217

Closed akshat-triv closed 3 years ago

akshat-triv commented 3 years ago

I'm building an application where I want to show the data properties of a node inside that node. And when I register a node, I attach a unique id with it, and I add this unique Id as a key in my vuex store inside an object, which contains all the present nodes. And I also pass this unique Id as a prop to these node components, so that I can get the data object with that unique key from vuex, the problem is that, I cannot access vuex from inside of the node component. this.$store is undefined, if I use composition API, const store = useStore(), even then store remains undefined. What should I do ?

BTW, thanks for this amazing library.

jerosoler commented 3 years ago

View https://github.com/jerosoler/Drawflow/issues/201

akshat-triv commented 3 years ago

Thanks, man for such a fast reply, it worked. Again thank you for such an awesome library.