@equinor/fusion
Advanced tools
Comparing version 0.1.28 to 0.1.29
@@ -1,2 +0,2 @@ | ||
import { useState, useEffect, useCallback } from "react"; | ||
import { useState, useEffect } from "react"; | ||
import { useFusionContext, defaultSettings } from "../core/FusionContext"; | ||
@@ -6,10 +6,7 @@ export default () => { | ||
const [coreSettings, setCoreSettings] = useState(settings.core.toObject() || defaultSettings); | ||
const setSettings = useCallback((settings) => { | ||
setCoreSettings(settings); | ||
}, []); | ||
useEffect(() => { | ||
settings.core.toObjectAsync().then(setSettings); | ||
return settings.core.on("change", setSettings); | ||
}, []); | ||
settings.core.toObjectAsync().then(setCoreSettings); | ||
return settings.core.on("change", setCoreSettings); | ||
}, [setCoreSettings]); | ||
return coreSettings; | ||
}; |
{ | ||
"name": "@equinor/fusion", | ||
"version": "0.1.28", | ||
"version": "0.1.29", | ||
"description": "Everything a Fusion app needs to communicate with the core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
109064
2509