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 @@
* // Extract some data of interest from the store.
* () => store.getValue(),
*
* // Use strict comparison of values
* null,
*
* // Callback that is invoked each time the extracted data changes.
* (currentValue, prevValue) => { ... }
* );
......@@ -28,10 +25,10 @@
* store.subscribe,
* () => [store.getValueA(), store.getValueB()],
*
* ([currentValueA, currentValueB], [prevValueA, prevValueB]) => { ... },
*
* // Compare each element of the result
* shallowEqual,
*
* ([currentValueA, currentValueB], [prevValueA, prevValueB]) => { ... }
* );
*
* @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