JSPM

  • Created
  • Published
  • Downloads 767416
  • Score
    100M100P100Q177350F
  • License MIT

Print React components in the browser

Package Exports

  • react-to-print

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-to-print) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ReactToPrint - Print React components in the browser

Build Status dependencies Status npm version

Print React components in the browser

Install

npm install react-to-print --save-dev

Demo

Usage

class Example extends React.Component {

  render() {
    return (
      <div>
         <ReactToPrint
          trigger={() => (
            <a href="#">Print this out!</a>
          )}
          content={() => this.componentRef}
         />               
        <ComponentToPrint ref={(el) => this.componentRef = el} />
      </div>
    );

  }
}