0👍
This is the case for a ref, which basically is a recipe that allows to pass arbitrary value by reference. Since meditor
isn’t supposed to be used prior to useCodeEditor
call, it makes more sense to define it inside a composable instead of providing it as an argument:
function useCodeEditor(monaco) {
const meditor = ref(null);
...
return {
meditor,
...
}
}
- [Vuejs]-How to integrate custom extension to Vue
- [Vuejs]-Repeat the same behaviour on Ant Design Editable Table for React on Ant Design Vue 3?
Source:stackexchange.com