preactjs / preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
http://npm.im/preact-compat
MIT License
950 stars 148 forks source link

I got an error: 'h' must be in scope when using JSX #514

Closed rafi16jan closed 5 years ago

rafi16jan commented 5 years ago

I got an error: 'h' must be in scope when using JSX

I'm manually tweaking react dependencies from a react template and got this. What should I do?

rafi16jan commented 5 years ago

Sorry wrong repo. I should report this to just-boris/create-preact-app because I use his dependencies.

marvinhagemeister commented 5 years ago

@rafi16jan Most likely the import for h is missing. Check that there is an import for h present:

import { h } from 'preact';