# react-isomorphic-loader

> An higher order component to load frontend libraries only in browser for react isomorphic apps

Latest version **1.0.0** (published 2017-04-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-isomorphic-loader
pnpm add react-isomorphic-loader
yarn add react-isomorphic-loader
bun add react-isomorphic-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 | 1.0.0 |
| Published | 2017-04-11 |
| First published | 2017-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | FRIN Yvonnick |
| Maintainers | yvonnick |

## Links

- npm: https://www.npmjs.com/package/react-isomorphic-loader
- Repository: https://github.com/frinyvonnick/react-isomorphic-loader
- Homepage: https://github.com/frinyvonnick/react-isomorphic-loader#readme
- Issues: https://github.com/frinyvonnick/react-isomorphic-loader/issues
- npm.io page: https://npm.io/package/react-isomorphic-loader

## Recent versions

- 1.0.0 (latest) — 2017-04-11

## README

# react-isomorphic-loader

**react-isomorphic-loader**'s purpose is to load frontend libraries only in browser for react isomorphic apps

This is a [higher order component](https://facebook.github.io/react/docs/higher-order-components.html) ("HOC"). It's an advanced pattern used in React that lets you reuse code logic, it can be summarized as a component factory. It improves isolation, interoperability and maintainability of your code base. 

## Installation

```bash
npm i --save react-isomorphic-loader
```

## Properties

Parameter | Type | Required | Default value | Description
----------|------|----------|---------------|-------------
`libraries` | string&#124;string[] | yes | undefined | It represents a path or a list of paths to frontend libraries.  
`strict` | bool | no | `true` | If `false` children are rendered even if libraries aren't loaded. `true`children are rendered only if libraries are loaded

## Usage

### For one library

```jsx
<IsomorphicLoader libraries="path/to/some/library/that/need/browser/globals">
  {(myLibraryThatNeedBrowserGlobals) => (<Child />)}
</IsomorphicLoader>
```

### For multiple library

```jsx
<IsomorphicLoader libraries={[
    "path/to/a/library/that/need/browser/globals",
    "path/to/another/library/that/need/browser/globals",
  ]}
>
  {(theFirstLibrary, theSecondLibrary) => (<Child />)}
</IsomorphicLoader>
```

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