Skip to content

Add React.render to your component automatically (used in reactview)

Notifications You must be signed in to change notification settings

zackify/render-placement-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9f9e93a · May 15, 2015

History

10 Commits
May 13, 2015
May 14, 2015
May 15, 2015
May 15, 2015

Repository files navigation

##React Render Placement Loader

This will add React.render(,document.body) to your jsx for you. It will also replace React.render(class,document.getElementById('blah')) with document.body if it exists. You can turn that off by adding ?replace=false.

You can also pass an optional props object via the query.

Usage:

{
    test: /\.jsx$/,
    loader: 'render-placement-loader',
    query: { props: { foo: 'bar' } }
}

Works with ES6 classes and React.createClass components. Would like to use a better regex though.