sebact

1.0.0 • Public • Published

💯 sebact

My own React (heavily inspired by Didact)

Elements

Describes what needs to be rendered and have two required properties: type and props

const myElement = {
  type: 'div',
  props: {
    id: 'container',
    children: [
      { type: 'input', props: { value: 'foo', type: 'text' } },
      { type: 'a', props: { href: '/bar' } },
      { type: 'span', props: {} }
    ]
  }
};

Which is translated to the DOM in the following way:

<div id="container">
  <input value="foo" type="text" />
  <a href="/bar" />
  <span></span>
</div>

Readme

Keywords

none

Package Sidebar

Install

npm i sebact

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

22.4 kB

Total Files

4

Last publish

Collaborators

  • seb7887