Using kotlin-styled, I am trying to get a simple c...
# javascript
i
Using kotlin-styled, I am trying to get a simple css rotation animation to work within a react component. So in my code i have this:
Copy code
animation(1.s, Timing.linear, iterationCount = IterationCount.infinite) {
                                    from {
                                        transform {
                                            rotate(0.deg)
                                        }
                                    }
                                    to {
                                        transform {
                                            rotate(360.deg)
                                        }
                                    }
                                }
It works on the dev server. However, when i open the production build, I get a runtime error:
Error: An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#12 for more information. Additional arguments: gbLFjP
where that link states:
It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css`` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css
How should i approach this problem?