configcat-react
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -15,7 +15,6 @@ "use strict"; | ||
var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1]; | ||
var userState = (0, react_1.useState)(user)[0]; | ||
(0, react_1.useEffect)(function () { | ||
configCatContext.client.getValueAsync(key, defaultValue, userState) | ||
configCatContext.client.getValueAsync(key, defaultValue, user) | ||
.then(function (v) { setFeatureFlag(v); setLoading(false); }); | ||
}, [configCatContext, key, defaultValue]); | ||
}, [configCatContext, key, defaultValue, JSON.stringify(user)]); | ||
return { value: featureFlagValue, loading: loading }; | ||
@@ -22,0 +21,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = "2.2.1"; | ||
exports.default = "2.3.0"; |
@@ -9,7 +9,6 @@ import { useContext, useEffect, useState } from "react"; | ||
var _b = useState(true), loading = _b[0], setLoading = _b[1]; | ||
var userState = useState(user)[0]; | ||
useEffect(function () { | ||
configCatContext.client.getValueAsync(key, defaultValue, userState) | ||
configCatContext.client.getValueAsync(key, defaultValue, user) | ||
.then(function (v) { setFeatureFlag(v); setLoading(false); }); | ||
}, [configCatContext, key, defaultValue]); | ||
}, [configCatContext, key, defaultValue, JSON.stringify(user)]); | ||
return { value: featureFlagValue, loading: loading }; | ||
@@ -16,0 +15,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export default "2.2.1"; | ||
export default "2.3.0"; |
{ | ||
"name": "configcat-react", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "npm run build:esm && npm run build:cjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57132
756