Search code examples
reactjsthemesstyled-componentsinfernojs

Using styled-components with Inferno JS


I'm using InfernoJS as an alternative for React. Is it possible to use styled-components in Inferno without inferno-compat?


Solution

  • Inferno has a React-like API but doesn't try to be 100% compatible. (contrary to Preact, which works with styled-components out of the box)

    Since styled-components returns React components and not Inferno components you have to use inferno-compat.