Currently in the process of setting up a project using Vuex and Vue, I have encountered a peculiar issue. It seems to be related to the order of rendering, but despite multiple attempts to modify the code, the problem persists.
My approach involved accessing the state with getters in the parent component and passing it via a slot, instead of directly in the child component, as I will demonstrate below.
Even though I attempted to pass the value using $this.$store.state
and found it to be undefined, a console log within an instance method revealed that all the data was indeed present.
You can view my code here.
The error message in the provided link is similar to the one I am encountering:
[Vue warn]: Error in render: "TypeError: Cannot read property 'state' of undefined"
Thank you to anyone willing to take the time to investigate.
P.S: When I changed it to store.state.stake.value
, the content displayed correctly, but a new error arose:
[Vue warn]: Invalid handler for event "click": got undefined