Skip to content

Commit

Permalink
Prevent app rerenders on ambient connection updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
zedkai committed Aug 31, 2021
1 parent 747c67f commit 21b2fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getWeb3Library(

const AppWeb3ConnectionWrapper: React.FC<{}> = () => {
useAmbientConnection();
return <App />;
return React.useMemo(() => <App />, []);
};

const AppRoot: React.FC<{}> = () => {
Expand Down

0 comments on commit 21b2fde

Please sign in to comment.