Is there an advantage of using the keyframes export in emotion over just defining the @keyframes in line with the css?
If you were to define it in the CSS it wouldn't be reusable so any place you need to use the animation you would need to duplicate the code. You could then pop it in easily like this:
<div css={css` animation: ${hop} 1s ease infinite; `} > some bouncing text! </div>
Ahh I see. I'm just getting into emotion and this post was quiet helpful
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is there an advantage of using the keyframes export in emotion over just defining the @keyframes in line with the css?
If you were to define it in the CSS it wouldn't be reusable so any place you need to use the animation you would need to duplicate the code. You could then pop it in easily like this:
Ahh I see. I'm just getting into emotion and this post was quiet helpful