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

Question: React 17.0.2 Compatibility? #218

Closed HeyWrecker closed 2 years ago

HeyWrecker commented 2 years ago

Does htm support version 17 and up of React? Asking because I initially wrote my application using es-react which is pinned at version 16.13.1. I'm using the React hooks development pattern and everything just works.

However, when I try to switch to an ESM module of React 17.0.2 I receive the Invalid Hooks Call error message. I'm running this all inline- there is no node directory, no builder, and there are not multiple versions of React being imported or loaded into the page. It's all very straightforward. At this point I'm just trying to run a list of any possible conflicts that might cause this error.

Thanks for your help!

Best Regards, Rick Zawadzki

HeyWrecker commented 2 years ago

I found the issue- the ESM module I was using was somehow incorrect. I located a different ESM module of React and React-DOM and that worked. Thank you for your patience with my question.