Skip to content

Commit

Permalink
Use callback for domainListRest to avoid infinite re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant authored and peterjah committed May 24, 2024
1 parent 3381e19 commit 9ce5ab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web-frontend/src/custom/useMNS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export function useMNS() {
setTargetMnsAddress('');
}

function resetDomainList() {
const resetDomainList = useCallback(() => {
setDomainNameList([]);
}
}, []);

return {
domainNameList,
Expand Down

0 comments on commit 9ce5ab3

Please sign in to comment.