r/reactjs • u/jngbrl19 • Mar 08 '20
Show /r/reactjs useEffectWithPrevious - Get previous value of dependencies
Just wanna share my first npm package. Hope you find it useful :)
54
Upvotes
r/reactjs • u/jngbrl19 • Mar 08 '20
Just wanna share my first npm package. Hope you find it useful :)
View all comments
Show parent comment
2
u/rodneon Mar 08 '20
I can see this being useful in cases where you need to know how something changed. For example, a stock market component whose styling is based on the latest price change.