sunnylqm / react-native-storage

local storage wrapper for both react-native and browser. Support size controlling, auto expiring, remote data auto syncing and getting batch data in one query.
MIT License
3.02k stars 268 forks source link

getBatchDataWithIds support syncParams #175

Closed tong233 closed 5 years ago

tong233 commented 6 years ago

fix getBatchDataWithIds storage.sync syncParams undefined.

tong233 commented 6 years ago

162行不加syncParams好像也没影响

sunnylqm commented 6 years ago

这个是解决什么场景下的什么问题?

tong233 commented 6 years ago
storage.getBatchDataWithIds({
    key: 'enumList',
    ids: ids,
    syncParams: {
      hasPlaceholder: true
    }
  })
storage.Sync = {
  enumList(params) {
    const { id, resolve, reject, syncParams } = params
    console.log(syncParams) // undefined 这里取不到值
    ...
  }
}

storage.load没这个问题