@webkrafters/react-eagleeye 1.1.0-alpha.6 → 1.1.0-alpha.7
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/dist/main/index.js
CHANGED
|
@@ -123,7 +123,6 @@ var ObservableContext = exports.ObservableContext = /*#__PURE__*/function (_Abst
|
|
|
123
123
|
get: function get() {
|
|
124
124
|
var stream = this.stream;
|
|
125
125
|
return function (selectorMap) {
|
|
126
|
-
var strictMode = (0, _react.useRef)(true);
|
|
127
126
|
var _useState = (0, _react.useState)(function () {
|
|
128
127
|
return stream(selectorMap);
|
|
129
128
|
}),
|
|
@@ -139,20 +138,15 @@ var ObservableContext = exports.ObservableContext = /*#__PURE__*/function (_Abst
|
|
|
139
138
|
channel.selectorMap = selectorMap;
|
|
140
139
|
}, [selectorMap]);
|
|
141
140
|
(0, _react.useEffect)(function () {
|
|
142
|
-
if (!strictMode.current) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
141
|
channel.addListener('data-changed', function () {
|
|
146
142
|
return setStore(_objectSpread(_objectSpread({}, store), {}, {
|
|
147
143
|
data: channel.data
|
|
148
144
|
}));
|
|
149
145
|
});
|
|
150
|
-
strictMode.current = false;
|
|
151
146
|
return function () {
|
|
152
|
-
channel.endStream();
|
|
153
|
-
strictMode.current = true;
|
|
147
|
+
return channel.endStream();
|
|
154
148
|
};
|
|
155
|
-
}, []);
|
|
149
|
+
}, [channel]);
|
|
156
150
|
return store;
|
|
157
151
|
};
|
|
158
152
|
}
|
|
@@ -131,7 +131,7 @@ export declare class EagleEyeUniversal<T extends State> {
|
|
|
131
131
|
<const ID extends string>(props?: WithChildren<ProviderPropsPrimitive<T, ID>>): JSX.Element;
|
|
132
132
|
<const ID extends string>(props?: WithChildren<RefProps<ID>>): JSX.Element;
|
|
133
133
|
};
|
|
134
|
-
get useStream(): <const S extends SelectorMap>(selectorMap?: S) => Store<
|
|
134
|
+
get useStream(): <const S extends SelectorMap>(selectorMap?: S) => Store<T, S>;
|
|
135
135
|
provide<const ID extends string>(props?: ProviderProps<T, ID>): Point<T, ID>;
|
|
136
136
|
provide<const ID extends string>(props?: ProviderPropsRaw<T, ID>): Point<T, ID>;
|
|
137
137
|
provide<const ID extends string>(props?: ProviderPropsPrimitive<T, ID>): Point<T, ID>;
|
package/package.json
CHANGED
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
|
|
126
126
|
},
|
|
127
127
|
"types": "dist/index.d.ts",
|
|
128
|
-
"version": "1.1.0-alpha.
|
|
128
|
+
"version": "1.1.0-alpha.7",
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"@webkrafters/eagleeye": "^1.0.8",
|
|
131
131
|
"js-sha512": "^0.9.0",
|