developit / htm

Hyperscript Tagged Markup: JSX alternative using standard tagged templates, with compiler support.
Apache License 2.0
8.64k stars 169 forks source link

Using Styled-Components with htm #231

Closed jason-merrell closed 1 year ago

jason-merrell commented 1 year ago

I have an experimental React project using htm and skypack. I'm not the best in React and I realize what I'm trying is highly unconventional, but the entire site runs with no compilers, no babel, no build scripts, no nothing... it's all done in the browser. My issue is trying to use styled-components with htm. When trying to to use the "HeaderWrapper" variable inside of the template literal, it produces a "m is not a function" error that I've exhausted myself in resolving.

I think there is a larger issue here that I'm missing, though. Is there a piece I'm missing in implementing an import like styled-components?

The file in question is here: https://github.com/merrellj-codeup/curriculum-app/blob/main/layout/Header/index.js