How to update app data from app object itself

Hello,

How to update data from the main app object?
App/Core data is a function.
I’m doing in the main app methods functions:
this.data.example
Didn’t find any example for this, but I think it’s not to good since data was originally a function.
$setState is only mentioned for components

var app = new Framework7({
  root: '#app',
  name: 'Test',
  version: '1.0.0',
  id: 'pl.Test.test',
  theme: Framework7.device.desktop ? 'aurora' : 'auto',
  data: function () {
    return {
      example: ''
    }
  },
  methods: {
    test: function() {
      this.data.example = 'new value'
    }
  }
})

You can just use:

test: function() {
this.example = ‘new value’
}

The “data” part is only used on first initialization.

If “this” is an app object then “this.example” isn’t correct.
console.log shows this->data->example

The question is: is it OK to change object directly or should I use some function, like $setState or something else?

Так не сработает, нужно this.data.varName