Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code for blogpost "Using JSX for your own lightweight declarative library": https://medium.com/@mikaelbrevik/using-jsx-for-your-own-lightweight-declarative-library-a773d3796475
function Header(props) {
return <h1 id={props.id}>Title: {props.children}</h1>;
}
// Or with destructuring
function Header({ id, children }) {
return <h1 id={id}>Title: {children}</h1>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.