Commit 6b304bd4 authored by Robert Knight's avatar Robert Knight

Update `watch` examples to match interface

The `compare` and `callback` arguments were swapped during earlier
development, but the examples were not updated to match.
parent 2513de04
...@@ -12,9 +12,6 @@ ...@@ -12,9 +12,6 @@
* // Extract some data of interest from the store. * // Extract some data of interest from the store.
* () => store.getValue(), * () => store.getValue(),
* *
* // Use strict comparison of values
* null,
*
* // Callback that is invoked each time the extracted data changes. * // Callback that is invoked each time the extracted data changes.
* (currentValue, prevValue) => { ... } * (currentValue, prevValue) => { ... }
* ); * );
...@@ -28,10 +25,10 @@ ...@@ -28,10 +25,10 @@
* store.subscribe, * store.subscribe,
* () => [store.getValueA(), store.getValueB()], * () => [store.getValueA(), store.getValueB()],
* *
* ([currentValueA, currentValueB], [prevValueA, prevValueB]) => { ... },
*
* // Compare each element of the result * // Compare each element of the result
* shallowEqual, * shallowEqual,
*
* ([currentValueA, currentValueB], [prevValueA, prevValueB]) => { ... }
* ); * );
* *
* @template T * @template T
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment