3 ms·
You might like lit-html, which has a very similar structure as JSX, but does so with standard JavaScript: https://lit-html.polymer-project.org/ https://lit-html
by spankalee 7y ago
You might like lit-html, which has a very similar structure as JSX, but does so with standard JavaScript: https://lit-html.polymer-project.org/ https://lit-html.polymer-project.org/
React:
const Welcome = (props) => <h1>Hello, {props.name}</h1>;
ReactDOM.render(<Welcome name="Taylor" />, document.getElementById('react-welcome'));
lit-html:
const welcome = (name) => html`<h1>Hello, ${name}</h1>`;
render(welcome('lit-html'), document.getElementById('lit-welcome'));