diff --git a/phone/src/apps/twitter/components/tweet/TweetList.tsx b/phone/src/apps/twitter/components/tweet/TweetList.tsx index 9b1e119..539c5e5 100644 --- a/phone/src/apps/twitter/components/tweet/TweetList.tsx +++ b/phone/src/apps/twitter/components/tweet/TweetList.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, memo } from "react"; import { List } from "../../../../ui/components/List"; import Tweet from "./Tweet"; @@ -21,7 +21,9 @@ export function TweetList({ tweets }) { // another flash to the tweets screen. const hasLoaded = tweets && minimumLoadPassed; + if (!hasLoaded) return ; + console.log(tweets.length); return ( {tweets.map((tweet) => ( @@ -31,4 +33,4 @@ export function TweetList({ tweets }) { ); } -export default TweetList; +export default memo(TweetList); // only re-render if our tweets change