react-native-onyx 1.0.74 → 1.0.76
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/API.md +0 -1
- package/README.md +0 -10
- package/dist/web.development.js +887 -5790
- package/dist/web.development.js.map +1 -1
- package/dist/web.min.js +1 -2
- package/dist/web.min.js.map +1 -1
- package/lib/Onyx.js +7 -48
- package/package.json +1 -2
- package/dist/web.min.js.LICENSE.txt +0 -1
- package/lib/DevTools.js +0 -49
package/API.md
CHANGED
|
@@ -319,7 +319,6 @@ Initialize the store with actions and listening for storage events
|
|
|
319
319
|
| [options.captureMetrics] | <code>Boolean</code> | | Enables Onyx benchmarking and exposes the get/print/reset functions |
|
|
320
320
|
| [options.shouldSyncMultipleInstances] | <code>Boolean</code> | | Auto synchronize storage events between multiple instances of Onyx running in different tabs/windows. Defaults to true for platforms that support local storage (web/desktop) |
|
|
321
321
|
| [options.debugSetState] | <code>Boolean</code> | | Enables debugging setState() calls to connected components. |
|
|
322
|
-
| [options.enableDevTools] | <code>Boolean</code> | | Enables debugging using Redux DevTools extension. |
|
|
323
322
|
|
|
324
323
|
**Example**
|
|
325
324
|
```js
|
package/README.md
CHANGED
|
@@ -321,18 +321,8 @@ Sample output of `Onyx.printMetrics()`
|
|
|
321
321
|
|
|
322
322
|
# Debug mode
|
|
323
323
|
|
|
324
|
-
## Using debugSetState
|
|
325
|
-
|
|
326
324
|
It can be useful to log why Onyx is calling `setState()` on a particular React component so that we can understand which key changed, what changed about the value, and the connected component that ultimately rendered as a result. When used correctly this can help isolate problem areas and unnecessary renders in the code. To enable this feature, pass `debugSetState: true` to the config and grep JS console logs for `[Onyx-Debug]`.
|
|
327
325
|
|
|
328
|
-
## Using Redux DevTools extension
|
|
329
|
-
|
|
330
|
-
It can be useful to check the order of writes to the storage and it's state at a specific point in time.
|
|
331
|
-
|
|
332
|
-
First, install Redux DevTools through your favorite browser ([Edge](https://microsoftedge.microsoft.com/addons/detail/redux-devtools/nnkgneoiohoecpdiaponcejilbhhikei), [Chrome](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/reduxdevtools/))
|
|
333
|
-
|
|
334
|
-
Then, you can enable this type of debugging by passing `enableDevTools: true` to `Onyx.init({...})`.
|
|
335
|
-
|
|
336
326
|
# Development
|
|
337
327
|
|
|
338
328
|
`react-native` bundles source using the `metro` bundler. `metro` does not follow symlinks, so we can't use `npm link` to
|