@equinor/fusion
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -6,4 +6,9 @@ import React, { useState, useEffect, useCallback } from "react"; | ||
const [isFetching, setIsFetching] = useState(false); | ||
const currentApp = appContainer.get(appKey); | ||
const [, forceUpdate] = useState(); | ||
useEffect(() => { | ||
// If the app has been registered between rendering the app and useEffect | ||
if (appKey && currentApp && appContainer.get(appKey)) { | ||
forceUpdate(null); | ||
} | ||
return appContainer.on("update", app => { | ||
@@ -29,3 +34,2 @@ if (app.appKey === appKey) { | ||
}, [appKey]); | ||
const currentApp = appContainer.get(appKey); | ||
if (currentApp === null && isFetching) { | ||
@@ -32,0 +36,0 @@ return React.createElement("div", null, "Is fetching"); |
{ | ||
"name": "@equinor/fusion", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"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
88365
2015