@atom-iq/babel-plugin-jsx

0.4.0-alpha.13 • Public • Published

Atom-iQ Babel Plugin JSX

@atom-iq/babel-plugin-jsx

This plugin transforms JSX into Atom-iQ Reactive Virtual DOM Nodes:

  • RvdElementNode for HTML and SVG Elements
  • RvdComponentNode for Components
  • RvdFragmentNode for Fragments (<>{...}</> or <Fragment>{...}</Fragment>
  • normalizeProps function - called additionally for Elements with spread props

It's based on InfernoJS Babel Plugin, re-implemented for Atom-iQ. It's adding Atom-iQ specific Element and Child flags, for faster checks on runtime. They're different from flags in InfernoJS, specific for rvDOM architecture. It's also simplified, as some optimizations aren't needed in Atom-iQ - in example it's not creating (rvDOM) Text Nodes, just returning strings.

How to use

It's recommended to use iQ CLI - it has included this plugin in standard build config.

Otherwise, include it in plugins in Babel config - in the current version it has no config.

Package Sidebar

Install

npm i @atom-iq/babel-plugin-jsx

Weekly Downloads

19

Version

0.4.0-alpha.13

License

MIT

Unpacked Size

29.1 kB

Total Files

9

Last publish

Collaborators

  • adamf