Add a parameter to enable animation when mounting a component #37
StKostyantin
started this conversation in
Ideas
Replies: 1 comment
-
Hi 👋. I'm not sure this belongs in the core library, but I'll leave it open as a discussion for visibility. The current recommendation is to do it with an effect e.g. export default function AnimatedNumberOnMount() {
const [value, setValue] = React.useState(0)
React.useEffect(() => setValue(123.4), [])
return <NumberFlow value={value} />
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Example
<NumberFlow value={value} mount={true} />
Beta Was this translation helpful? Give feedback.
All reactions