Closed matt-erhart closed 6 years ago
The issue here was passing {...props} instead of attributes and children separately. Unlike like other components, Glamorous doesn't ignore slate things in ...props like editor etc. return <Span {...props} contentEditable={false} title='meta test' />; // work everywhere but glamorous return <Span {...props.attributes} contentEditable={false} title='meta test' > {props.children} ; // work everywhere
glamorous
version: ^4.12.2glamor
version: ^2.20.40react
version: 16.3.9Relevant code. <Span {...props} />;
What you did: Use a glamorous component in slatejs
What happened: Memory leak / browser crash.
Reproduction: https://codesandbox.io/s/409rxn0my7 index.js line 45-46. Be ready to crash your tab/browser.
Already posted to slatejs as I assume that's we're the trouble is. This does stop me from using glamorous here, and there's a slight chance it might help you track down some funky code. Styled components doesn't have this problem. Is glamorous passing in some extra prop that I need to block?