Closed zhangwei900808 closed 1 year ago
No idea what your problem is. Here's a working example from the test suite.
@petyosi Its means that I must use @emotion/styled
and cant use my component?
@zhangwei900808 I had the same issue. The solution is to use React.forwardRef
method like this:
List: React.forwardRef(({ style, children }, ref) => (
<div
ref={ref}
style={style}
>
{children}
</div>
))
@Fr0stmourne solution should really be the default. Especially with next13 and css-in-js being deprecated. Many devs are moving to either tailwind, modules css, panda or other css solutions. Emotion right now is largely deprecated.