[Vuejs]-Making read-only fields in a Vue observable?

0👍

You can freeze the object before make it reactive, like this example below.

const user = Vue.observable(
        Object.freeze({
          displayName: '...',
          isSignedIn: true   // Boolean
        })
      );     

The question is why to use this, better to expose a non-reactive object. Check the Vue.observable definition here

Leave a comment