0 votes
in VueJS by
How to identify whether code is running on client or server  in VueJS?

1 Answer

0 votes
by

You can use vm.$isServer method to know whether the current Vue instance is running on the server or client.

The usage would be as below,

const Vue = require('vue');
Vue.prototype.$isServer
(OR)
this.$isServer // With in component

Related questions

0 votes
asked Sep 7, 2023 in VueJS by DavidAnderson
0 votes
asked Sep 7, 2023 in VueJS by AdilsonLima
...