I'm using create-react-app for project setup.
I found that I can't directly use h function in TypeScript.
Please see this minimum example code:
import { FunctionalComponent, h } from 'preact';
const Text: FunctionalComponent = () => {
const tag = 'div'
const props = {}
const children = 'I am children'
return (
h(tag, props, children)
)
}

It says: Cannot invoke an expression whose type lacks a call signature. Type 'typeof h' has no compatible call signatures.
If I directly use JSX, it will be fine:

How can I directly use the h function in TypeScript?
What version of preact are you using?
@JoviDeCroock I'm using ^10.0.0-beta.2 version (latest beta version)
@rockmandash 10.0.0-beta.3 should be the latest and the issue should be fixed there, could try upgrading and tell me if that solves your problem?
It worked!
Most helpful comment
@rockmandash
10.0.0-beta.3should be the latest and the issue should be fixed there, could try upgrading and tell me if that solves your problem?