Skip to content

Usage "h" function in examples #3123

Answered by JoviDeCroock
naliferov asked this question in Q&A
Discussion options

You must be logged in to vote

It's a transpilation support, basically JSX isn't valid JS so when your transpiler comes into play this component will be transformed to:

// From
const HelloWorld = () => <p>Hello world</p>
// TO
const HelloWorld = () => h('p', {}, 'Hello world');

So basically so h is defined within the scope

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ForsakenHarmony
Comment options

You must be logged in to vote
1 reply
@JoviDeCroock
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants