node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

babel-preset-compose

babel-preset-compose

Babel preset that transforms JSX into Compose.createElement() calls.

Install

This preset is bundled within compose.js framework, so if you have it already installed, you can just skip to Usage section.

Via NPM

npm install babel-preset-compose --save-dev

or Yarn

yarn add babel-preset-compose --dev

Usage

It depends on how you configure Babel, however the most popular way is to use .babelrc file. Update your config file by adding compose preset:

{
  "presets": [
    "compose"
  ]
}