mirror of
https://github.com/logos-messaging/waku-react.git
synced 2026-01-03 22:53:06 +00:00
remove deps for useEffect for createWaku to prevent re rendering
This commit is contained in:
parent
201a000c43
commit
e73f4bea67
@ -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"],
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user