peti

1.0.3-alpha • Public • Published

PetiJS

Very small library to render JSX.

Inspired by React, of course.

How it works

babel-plugin-transform-react-jsx will turn JSX into React Peti function calls.

The only things you'll have to do are:

  • Import Peti
  • Add a babel plugin to convert JSX into functions
  • Configure this plugin with the following Pragma: Peti.createElement

Features

  • Turn JSX into function
    • className are converts into class
    • you can call vars inside JSX with {varName}
    • component inside another component (just like vars: {componentName})

Todo

  • Refs
    • No string refs, only functions

Events

You're a big boy, you can create your events yourself.

Readme

Keywords

none

Package Sidebar

Install

npm i peti

Weekly Downloads

2

Version

1.0.3-alpha

License

ISC

Unpacked Size

53.4 kB

Total Files

7

Last publish

Collaborators

  • bastienrobert