This repository was archived by the owner on Aug 4, 2019. It is now read-only.
This repository was archived by the owner on Aug 4, 2019. It is now read-only.
TypeError: Cannot read property 'refs' of undefined #10
Open
Description
It doesn't look like the second parameter 'context' is defined. The custom hooks are irrelevant to the issue, but this is how I am using them.
This is my code:
setup(props, context) {
const message = value("Hello Vue in CodeSandbox!");
const messageUppercase = computed(() => message.value.toUpperCase());
useKeypress("j", () => {
console.log("clicked!");
});
useElementKeypress("u", context.refs.elementKeypress, () => {
console.log("clicked!");
});
return { message, messageUppercase };
}
Metadata
Metadata
Assignees
Labels
No labels