[Vuejs]-Migrating from global mixins in vue2 to global composables in vue3

1👍

#1, You can put it into the globalProperties object

import {__, __n} from '@/Composables/translate.js';

const app = createApp(AppComponent);
app.config.globalProperties.__ = __;
app.config.globalProperties.__n = __n;

#2, though opinion based, importing for every component that needs it would be my preferred way.

👤Daniel

Leave a comment