Pass id to useEffect so it runs when id changes
This commit is contained in:
parent
efb3097c80
commit
c384aa6db2
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ export const HashtagTimeline: React.FC<IHashtagTimeline> = ({ params }) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(expandHashtagTimeline(id));
|
dispatch(expandHashtagTimeline(id));
|
||||||
dispatch(fetchHashtag(id));
|
dispatch(fetchHashtag(id));
|
||||||
}, []);
|
}, [id]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(clearTimeline(`hashtag:${id}`));
|
dispatch(clearTimeline(`hashtag:${id}`));
|
||||||
|
|
Loading…
Reference in a new issue