Pass id to useEffect so it runs when id changes
This commit is contained in:
@ -41,7 +41,7 @@ export const HashtagTimeline: React.FC<IHashtagTimeline> = ({ params }) => {
|
||||
useEffect(() => {
|
||||
dispatch(expandHashtagTimeline(id));
|
||||
dispatch(fetchHashtag(id));
|
||||
}, []);
|
||||
}, [id]);
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(clearTimeline(`hashtag:${id}`));
|
||||
|
||||
Reference in New Issue
Block a user