remove deps for useEffect for createWaku to prevent re rendering

This commit is contained in:
Sasha 2023-02-23 00:38:54 +01:00
parent 201a000c43
commit e73f4bea67
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@
], ],
"cypress/no-unnecessary-waiting": "off", "cypress/no-unnecessary-waiting": "off",
"react-hooks/rules-of-hooks": "error", "react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error", "react-hooks/exhaustive-deps": "warn",
"react/display-name": "warn", "react/display-name": "warn",
"react/prop-types": "off", "react/prop-types": "off",
"no-console": ["error"], "no-console": ["error"],

View File

@ -50,7 +50,7 @@ const useCreateNode = <N extends Waku, T = {}>(
return () => { return () => {
cancelled = true; cancelled = true;
}; };
}, [factory, options, protocols, setNode, setLoading, setError]); }, []);
return { return {
node, node,