I need to access a function that is defined in a JS class component. To use this function in the composition API, I need to:
setup(props) {
const {errorMessages, handleInput, setFieldData} = Validator.register(props); // function to use
return {
errorMessages,
handleInput,
input
}
}
Is there a way to achieve the same result using syntax that is more familiar to Vue 2?