Closed rebinnaf closed 1 year ago
I suppose this is a composition API question and not really specific to this module. You can probably do something like this in your component:
setup(props) {
const formattedName = computed(() => {
if (props.field.name) {
return `name:${props.field.name}`;
}
});
return { formattedName };
}
đ What are you trying to do? Please describe. I am not sure how to have an object prop without specific properties and then have a computed property based on it. I added a reproduction of my problem, I have a component that gets some data as prop and want to format it and then show it. But, although in the options api it is reactive, It is not reactive in composition api.
Reproduction
đ What have you tried? If I define
const field = ref({name:''});
it works but in my case I don't know what would be the response of the serverâšī¸ Additional context