@webkrafters/react-observable-context 2.1.1 → 2.1.2
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/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ The context's store update operation adheres to **2** user supplied prehooks whe
|
|
|
164
164
|
import React, { memo, useEffect } from 'react';
|
|
165
165
|
import { useContext } from '@webkrafters/react-observable-context';
|
|
166
166
|
import ObservableContext from './context';
|
|
167
|
-
const CONTEXT_KEYS
|
|
167
|
+
const CONTEXT_KEYS = [ 'price' ];
|
|
168
168
|
const PriceSticker = memo(() => {
|
|
169
169
|
const { getState } = useContext( ObservableContext, CONTEXT_KEYS );
|
|
170
170
|
useEffect(() => console.log( 'PriceSticker component rendered.....' ));
|
|
@@ -226,7 +226,7 @@ The context's store update operation adheres to **2** user supplied prehooks whe
|
|
|
226
226
|
|
|
227
227
|
<i><u>app.js</u></i>
|
|
228
228
|
|
|
229
|
-
import React, { useCallback,
|
|
229
|
+
import React, { useCallback, useState } from 'react';
|
|
230
230
|
import Product from './product';
|
|
231
231
|
const prehooks = {
|
|
232
232
|
resetState: ( ...args ) => {
|
package/package.json
CHANGED