this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix rerender bug with followed hashtag parent

And… somehow memoize it?

+22 -19
+22 -19
src/components/status.jsx
··· 407 407 } 408 408 409 409 // Check followedTags 410 - const FollowedTagsParent = ({ children }) => ( 411 - <div 412 - data-state-post-id={sKey} 413 - class="status-followed-tags" 414 - onMouseEnter={debugHover} 415 - > 416 - <div class="status-pre-meta"> 417 - <Icon icon="hashtag" size="l" />{' '} 418 - {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => ( 419 - <Link 420 - key={tag} 421 - to={instance ? `/${instance}/t/${tag}` : `/t/${tag}`} 422 - class="status-followed-tag-item" 423 - > 424 - {tag} 425 - </Link> 426 - ))} 410 + const FollowedTagsParent = useCallback( 411 + ({ children }) => ( 412 + <div 413 + data-state-post-id={sKey} 414 + class="status-followed-tags" 415 + onMouseEnter={debugHover} 416 + > 417 + <div class="status-pre-meta"> 418 + <Icon icon="hashtag" size="l" />{' '} 419 + {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => ( 420 + <Link 421 + key={tag} 422 + to={instance ? `/${instance}/t/${tag}` : `/t/${tag}`} 423 + class="status-followed-tag-item" 424 + > 425 + {tag} 426 + </Link> 427 + ))} 428 + </div> 429 + {children} 427 430 </div> 428 - {children} 429 - </div> 431 + ), 432 + [sKey, instance, snapStates.statusFollowedTags[sKey]], 430 433 ); 431 434 const StatusParent = 432 435 showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length