Skip to content

Commit

Permalink
- Home component need not be memoized...
Browse files Browse the repository at this point in the history
  • Loading branch information
supriyaamisshra committed Mar 1, 2022
1 parent 382d37f commit 326298f
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/react-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,17 +417,6 @@ function App(props) {
);
}

const homeScreen = React.useMemo(() => <Home
mainnetProvider={mainnetProvider}
localProvider={localProvider}
address={address}
tx={tx}
userSigner={userSigner}
writeContracts={writeContracts}
readContracts={readContracts}
streams={streams}
/>, [streams]);

return (
<div className="App">
{/* ✏️ Edit the header and change the title to your project name */}
Expand Down Expand Up @@ -460,7 +449,16 @@ function App(props) {

<Switch>
<Route exact path="/">
{homeScreen}
<Home
mainnetProvider={mainnetProvider}
localProvider={localProvider}
address={address}
tx={tx}
userSigner={userSigner}
writeContracts={writeContracts}
readContracts={readContracts}
streams={streams}
/>
</Route>
<Route path="/user/:address">
<UserStream
Expand Down

0 comments on commit 326298f

Please sign in to comment.