Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 560 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 560 Bytes

@hyunjin/jsx

JSX is a JavaScript XML syntax extension that allows you to write HTML-like code in JavaScript. This package provides a tagged template literal that converts JSX into a InMemory DOM.

Installation

npm install @hyunjin/jsx

Example

import jsx from '@hyunjin/jsx';

const $dom = jsx`
  <button onClick=${() => console.log('hello world')}>
    <span>Click me!</span>
  </button>
`;

Reference