Compare commits

...

3 Commits

Author SHA1 Message Date
semantic-release-bot 8d2b7b461b chore(release): 0.1.0-develop.19 [skip ci]
# [0.1.0-develop.19](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.18...v0.1.0-develop.19) (2023-10-12)

### Bug Fixes

* change fetchAndUpdateNetworks to be a cached callback ([f68070e](f68070e38c))
2023-10-12 15:48:14 +00:00
Derrick Hammer 9c876c834a
Merge remote-tracking branch 'origin/develop' into develop 2023-10-12 11:46:59 -04:00
Derrick Hammer f68070e38c
fix: change fetchAndUpdateNetworks to be a cached callback 2023-10-12 11:46:53 -04:00
4 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.19](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.18...v0.1.0-develop.19) (2023-10-12)
### Bug Fixes
* change fetchAndUpdateNetworks to be a cached callback ([f68070e](https://git.lumeweb.com/LumeWeb/sdk/commit/f68070e38c3549a952eb42fc8487fbeee34e8164))
# [0.1.0-develop.18](https://git.lumeweb.com/LumeWeb/sdk/compare/v0.1.0-develop.17...v0.1.0-develop.18) (2023-10-12)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"dependencies": {
"@lumeweb/kernel-network-registry-client": "0.1.0-develop.10",
"@lumeweb/libkernel": "0.1.0-develop.65",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/sdk",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"type": "module",
"main": "lib/index.js",
"types": "lib/src/index.d.ts",

View File

@ -57,7 +57,7 @@ const LumeProvider = ({ children }) => {
});
}, []);
const fetchAndUpdateNetworks = async () => {
const fetchAndUpdateNetworks = useCallback(async () => {
const unsub = () => {
statusUnsubs.current.forEach((unsub) => unsub());
statusUnsubs.current = new Map<any, any>();
@ -118,7 +118,7 @@ const LumeProvider = ({ children }) => {
console.error("Error fetching and updating networks:", error);
}
}
};
}, [handleStatusUpdate]);
useEffect(() => {
fetchAndUpdateNetworks();