@statsig/react-bindings 3.3.0-beta.3 → 3.4.0-beta.1
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/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/react-bindings",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-beta.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@statsig/client-core": "3.
|
|
6
|
-
"@statsig/js-client": "3.
|
|
5
|
+
"@statsig/client-core": "3.4.0-beta.1",
|
|
6
|
+
"@statsig/js-client": "3.4.0-beta.1"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"react": "^16.6.3 || ^17.0.0 || ^18.0.0"
|
|
@@ -5,7 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const client_core_1 = require("@statsig/client-core");
|
|
6
6
|
function useStatsigInternalClientFactoryAsync(factory, args) {
|
|
7
7
|
const [isLoading, setIsLoading] = (0, react_1.useState)(true);
|
|
8
|
-
const clientRef = (0, react_1.useRef)(
|
|
8
|
+
const clientRef = (0, react_1.useRef)((0, client_core_1._getInstance)(args.sdkKey));
|
|
9
9
|
const client = (0, react_1.useMemo)(() => {
|
|
10
10
|
if (clientRef.current) {
|
|
11
11
|
return clientRef.current;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useStatsigInternalClientFactoryBootstrap = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const client_core_1 = require("@statsig/client-core");
|
|
5
6
|
function useStatsigInternalClientFactoryBootstrap(factory, args) {
|
|
6
|
-
const clientRef = (0, react_1.useRef)(
|
|
7
|
+
const clientRef = (0, react_1.useRef)((0, client_core_1._getInstance)(args.sdkKey));
|
|
7
8
|
return (0, react_1.useMemo)(() => {
|
|
8
9
|
if (clientRef.current) {
|
|
9
10
|
return clientRef.current;
|