# simple-guards-react

> simple-guards utilities for react development

Latest version **1.1.1** (published 2017-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-guards-react
pnpm add simple-guards-react
yarn add simple-guards-react
bun add simple-guards-react
```

## 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.1.1 |
| Published | 2017-02-14 |
| First published | 2017-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Trabe |
| Maintainers | trabe |

## Links

- npm: https://www.npmjs.com/package/simple-guards-react
- Repository: https://github.com/trabe/simple-guards-react
- Homepage: https://github.com/trabe/simple-guards-react.git
- Issues: https://github.com/trabe/simple-guards-react/issues
- npm.io page: https://npm.io/package/simple-guards-react

## Dependencies (1)

- [simple-guards](https://npm.io/package/simple-guards.md) 1.0.0

## Recent versions

- 1.1.1 (latest) — 2017-02-14
- 1.1.0 — 2017-02-14
- 1.0.0 — 2017-02-14

## README

# Simple Guards React

## Description

React higher order component to add [simple guards](https://www.npmjs.com/package/simple-guards) to your
components.

## Install

```
npm instal simple-guards-react
```

## Usage

```
import React from "react";
import { withGuards } from "simple-guards-react";

const MyComponent = ({ name }) => (
  <div>
    Hello, <span>{name}</span>!
  </div>
);

const enhance = withGuards(({ name }, guard) => {
  guard(name === undefined, "name should be defined");
});

export default enhance(MyComponent);
```

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