@rpcbase/client 0.104.0 → 0.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.104.0",
3
+ "version": "0.106.0",
4
4
  "scripts": {
5
5
  "build-firebase": "webpack -c firebase/webpack.config.js",
6
6
  "build": "yarn build-firebase",
@@ -181,6 +181,8 @@ const getUseQuery = (register_query) => (
181
181
  if (!isEqual(data, newData)) {
182
182
  applyContext(context)
183
183
  applyNewData(newData, context)
184
+ } else {
185
+ applyContext(context)
184
186
  }
185
187
  })
186
188
 
@@ -188,10 +190,8 @@ const getUseQuery = (register_query) => (
188
190
  log && log("useQuery cleanup unsubscribe()")
189
191
  typeof unsubscribe === "function" && unsubscribe()
190
192
  }
191
-
192
-
193
193
  // TODO: this isnt right we need to update on options change too
194
- }, [JSON.stringify(query), key])
194
+ }, [JSON.stringify(query), data, key])
195
195
 
196
196
 
197
197
  const loadNextPage = useCallback(() => {
@@ -25,6 +25,9 @@ const getStorage = () => {
25
25
  } else {
26
26
  mmkv.set(key, JSON.stringify(value))
27
27
  }
28
+ },
29
+ clear: () => {
30
+ mmkv.clearAll()
28
31
  }
29
32
  }
30
33