# paperclip-react-loader

> **Installation**: `npm install paperclip-react-loader`

Latest version **10.1.38** (published 2019-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install paperclip-react-loader
pnpm add paperclip-react-loader
yarn add paperclip-react-loader
bun add paperclip-react-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 10.1.38 |
| Published | 2019-04-18 |
| First published | 2018-05-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | crcn |

## Links

- npm: https://www.npmjs.com/package/paperclip-react-loader
- npm.io page: https://npm.io/package/paperclip-react-loader

## Dependencies (6)

- [paperclip](https://npm.io/package/paperclip.md) ^10.1.38
- [@types/node](https://npm.io/package/@types/node.md) ^10.3.3
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.1.0
- [tandem-common](https://npm.io/package/tandem-common.md) ^10.1.38
- [paperclip-migrator](https://npm.io/package/paperclip-migrator.md) ^10.1.38
- [paperclip-react-compiler](https://npm.io/package/paperclip-react-compiler.md) ^10.1.38

## Recent versions

- 10.1.38 (latest) — 2019-04-18
- 10.1.36 — 2019-04-17
- 10.1.33 — 2019-02-09
- 10.1.32 — 2019-02-05
- 10.1.31 — 2019-02-04
- 10.1.25 — 2019-02-02
- 10.1.24 — 2019-02-02
- 10.1.23 — 2019-01-26
- 10.1.22 — 2019-01-17
- 10.1.21 — 2019-01-06
- 10.1.18 — 2018-12-27
- 10.1.17 — 2018-12-27
- 10.1.15 — 2018-12-22
- 10.1.14 — 2018-12-20
- 10.1.10 — 2018-12-19
- … 21 more at https://npm.io/package/paperclip-react-loader/versions

## README

**Installation**: `npm install paperclip-react-loader`

**Documentation for writing React controllers can be found in the [paperclip-react-compiler](../paperclip-react-compiler) package.**

This is a Webpack loader for converting Tandem UI files ([\*.pc](../../documentation/ui-files.md)) into React components. Here's a basic `webpack.config.js` example:

```javascript
const fs = require("fs");

module.exports = {
  mode: "development",
  entry: "./src/index,js",
  output: {
    path: "./lib",
    filename: "[name].bundle.js"
  },
  resolve: {
    extensions: [".js", ".ts"]
  },
  module: {
    rules: [
      {
        test: /.pc$/,
        use: [
          {
            loader: "paperclip-react-loader",
            options: {
              // the config is just the contents of your Tandem project file.
              config: JSON.parse(fs.readFileSync("./app.tdproject", "utf8"))
            }
          }
        ]
      }
    ]
  }
};
```

With the above config, we can load `*.pc` files into our app like normal modules. For example:

```javascript
import * as React from "react";
import * as ReactDOM from "react-dom";
import { Application } from "./app.pc";
ReactDOM.render(<Application />);
```

Documentation for using imported `*.pc` modules can be found in the [paperclip-react-compiler package](../paperclip-react-compiler)

---
_Source: https://npm.io/package/paperclip-react-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
