babel-plugin-transform-jsx-ref-to-function

0.0.4 • Public • Published

babel-plugin-transform-jsx-ref-to-function

Replace string value of the ref attribute to function.

Example

In

<button ref="button">Some button</button>

Out

<button ref={el => this['button'] = el}>Some button</button>

Installation

$ npm i --save-dev babel-plugin-transform-jsx-ref-to-function

Add this to you babel config plugins

plugins: [
    'babel-plugin-transform-jsx-ref-to-function'
]

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i babel-plugin-transform-jsx-ref-to-function

    Weekly Downloads

    3

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • fresk