0.1.2 • Published 6 years ago

babel-plugin-transform-nojsx v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

nojsx

Transpile plugin for custom components using nojsx.

This is a protest module against JSX. JSX breaks javascript. This does not.

A tiny bit of JS transpiling is needed to have a seamless experience with nojsx.

Install

npm install --save babel-plugin-transform-nojsx

.babelrc

{
  "presets": [
    ...
  ],
  "plugins": [
    ...
    "transform-nojsx"
  ]
}

Before Transpiling

html`<div>Hello. <AnotherThing></AnotherThing></div>`

After Transpiling

html`<div>Hello. <AnotherThing higherComponent=${AnotherThing}></AnotherThing></div>`

It simply allows for upper-context component function / object reference.

Notes

  • Not tested
  • Not production ready
  • Safer transpiling to come
  • Try for small projects and apps
  • All feedback is welcome

License

MIT.