0x0ece / yopa-native

0 stars 2 forks source link

Persist state changes to FileSystem #27 #28

Closed 0x0ece closed 6 years ago

0x0ece commented 6 years ago

In App.js I left a global var EXAMPLE_DATA = true. Setting it to false will let you test the initial experience.

Note that now every action done is persisted. Still in App.js, inside startAsync(), you can comment Utils.loadDataFromStoreAsync and uncomment Utils.deleteDataFromStoreAsync to delete the persisted file.

So:

  async startAsync() {
    // Utils.deleteDataFromStoreAsync()
    Utils.loadDataFromStoreAsync()
      .then((data) => {

can be changed into:

  async startAsync() {
    Utils.deleteDataFromStoreAsync()
    // Utils.loadDataFromStoreAsync()
      .then((data) => {