`box` styled component calls forwardRef on every render
Closed this issue · 0 comments
regan-karlewicz commented
const box = new Proxy(
{},
{
get: (_target, tagName: string) => {
if (!(tagName in _target)) {
_target[tagName] = make(tagName);
}
return _target[tagName];
},
},
) as StyledTags;
Current implementation can cause event handlers to get dropped, because the component is being recreated on each render