github emotion-js/emotion @emotion/sheet@1.0.0-next.3

latest releases: @emotion/styled@11.11.5, @emotion/serialize@1.1.4, @emotion/is-prop-valid@1.2.2...
pre-release3 years ago

Patch Changes

  • dc1a0c5e #1962 Thanks @Andarist! - From now on an empty <style/> element gets inserted eagerly into the DOM in the constructor in non-production environments. This helps to grab used keys from the (JS)DOM even for sheets/caches that have not inserted any actual rules to the document yet. It allows @emotion/jest to find those and serialize Emotion classes properly in situations like this:

    import styled from '@emotion/styled/macro'
    import { render } from '@testing-library/react'
    
    const Div = styled.div``
    
    test('foo', () => {
      const { container } = render(<Div />)
      expect(container).toMatchSnapshot()
    })

Don't miss a new emotion release

NewReleases is sending notifications on new releases.