Hello #9
subhashchamoli44
started this conversation in
Animals
Replies: 4 comments 1 reply
-
|
test |
Beta Was this translation helpful? Give feedback.
1 reply
-
import { h, render } from 'preact';
// Tells babel to use h for JSX. It's better to configure this globally.
// See https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#usage
// In tsconfig you can specify this with the jsxFactory
/** @jsx h */
// create our tree and append it to document.body:
render(
<main>
<h1>Hello</h1>
</main>,
document.body
);
// update the tree in-place:
render(
<main>
<h1>Hello World!</h1>
</main>,
document.body
);
// ^ this second invocation of render(...) will use a single DOM call to update the text of the <h1> |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
comment |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
comment |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
body of discussion
Beta Was this translation helpful? Give feedback.
All reactions