snabbdom-pragma-quickfix

1.7.1 • Public • Published

snabbdom-pragma

Well tested NotReact.createElement pragma although for snabbdom !

In brief

The main goal of snabbdom-pragma is to handle the same api as React.createElement to allow snabbdom users
to take all benefits from transpiler which are looking for React pragma compatibilities.

Getting started

To use snabbdom-pragma you need to download it thanks to your favorite JS package manager.

yarn add snabbdom-pragma
npm install --save snabbdom-pragma

Then replace your transpiler pragma by Snabbdom.createElement.

Dont miss to import the createElement function into your code.

import Snabbdom from 'snabbdom-pragma'

Compatibilities

Bublé

snabbdom-pragma is fully tested for Bublé

buble.transform(input, {
  jsx: 'Snabbdom.createElement'
})

Babel

snabbdom-pragma is fully tested for Babel with the transform-react-jsx plugin enabled

babel.transform(input, {
  plugins: ["transform-react-jsx", {
    pragma: 'Snabbdom.createElement'
  }]
});

Traceur

snabbdom-pragma is fully tested for Traceur

traceur.compile(input, {
  jsx: 'Snabbdom.createElement'
});

Misc

/snabbdom-pragma-quickfix/

    Package Sidebar

    Install

    npm i snabbdom-pragma-quickfix

    Weekly Downloads

    1

    Version

    1.7.1

    License

    MIT

    Last publish

    Collaborators

    • supermanitu