Skip to content

edmulraney/cork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cork

TLDR;

React-style components without JSX or a compile step. aka a runtime React. Don't use :) this is an unfinished experiment.

import { render, html } from 'cork'

const Title = props => html`<div>${props.children}</div>`

const Button = props => {
  return html`
    <button onclick="${e => console.log('hi native events')}">
      ${props.children}
    </button>
  `
}

const App = props => {
  return html`
    <>
      <Title>:)</Title>
      <Button>Press me</Button>
    </>
  `(Title, Button)
}

render(html`<App/>`(App), document.getElementById('app'))

Why?

For fun.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published