babel-plugin-react-deferred-children

1.1.1 • Public • Published

babel-plugin-react-deferred-children

Defer the evaluation of children for specific React components without function syntax.

Installation

In your babel config:

plugins: [
    ["react-deferred-children", {
        "elements": [ "Loader", "If" ]
    }]
]

What it does

In:

<If condition={false}>
    <ComponentThatWillBreakUnderCertainConditions />
</If>

Out:

<If condition={false}>
    {() => <ComponentThatWillBreakUnderCertainConditions />}
</If>

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-react-deferred-children

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

14.1 kB

Total Files

5

Last publish

Collaborators

  • naharper