inject-react-anywhere
inject-react-anywhere copied to clipboard
Better support for portals & CSS-in-JS
Currently (because of mutation observer), it's possible to have FOUC when using CSS-in-JS because styles are copied with small delay. It might be good idea to implement custom Sheet and Tag to support multiple targets for injection.
Related:
https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/sheet/Sheet.ts#L78C41-L78C41 https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/sheet/Tag.ts#L5
Fixes for styles-components, still need to work on emotion
Probably will need to implement custom cache https://github.com/emotion-js/emotion/blob/main/packages/cache/src/index.js