Hello Pera team, just wanted to report a small eslint warning regarding one of the next.js examples.
The following snippet from the codesandbox example on integration with next.js may potentially contain a typo:
useEffect(() => {
// Reconnect to the session when the component is mounted
peraWallet
.reconnectSession()
.then((accounts) => {
peraWallet.connector.on("disconnect", handleDisconnectWalletClick);
if (accounts.length) {
setAccountAddress(accounts[0]);
}
})
.catch((e) => console.log(e));
}, []);
Issue description form ESlint:
React Hook useEffect has a missing dependency: 'handleDisconnectWalletClick'. Either include it or remove the dependency array.eslint[react-hooks/exhaustive-deps](https://github.com/facebook/react/issues/14920)
In other words, the disconnect method has to be wrapped into a useCallback or dependency array removed completely.
Hello Pera team, just wanted to report a small eslint warning regarding one of the next.js examples.
The following snippet from the codesandbox example on integration with next.js may potentially contain a typo:
Issue description form ESlint:
In other words, the disconnect method has to be wrapped into a useCallback or dependency array removed completely.