Styled components

I’m trying to get npm package styled-components to work with Rescript React. I’ve tried importing from JS but got some vague error message in the browser: “process is not defined”

I was able to use styled-ppx but only with jsx version 3. When I use jsx version 4, I get this error message:

  The record field children can't be found.

  If it's defined in another module or file, bring it into scope by:
  - Prefixing it with said module name: TheModule.children
  - Or specifying its type:
  let theValue: TheModule.theType = {children: VALUE}

I assume that styled-ppx needs to be upgraded to work with jsx version 4. I can use jsx version 3 for now, but does anyone have other suggestions? Thanks

Hey, author of styled-ppx. Can you open an issue? I’m more than happy to support JSX 4 in styled-ppx but I need a little more time.

1 Like

Sure thing, and no rush. I was really just asking if there was something else I could do, but happy to use version 3 for now.

Cool, feel free to open any issue that you might encounter. Happy hacking