An open API service indexing awesome lists of open source software.

https://github.com/andrewprifer/react-state-render-prop

A component for introducing state through render props. Especially useful for controlling arrays of controlled components. Written in TypeScript.
https://github.com/andrewprifer/react-state-render-prop

react react-component reactjs

Last synced: 17 days ago
JSON representation

A component for introducing state through render props. Especially useful for controlling arrays of controlled components. Written in TypeScript.

Awesome Lists containing this project

README

        

# React State Render Prop

A component for introducing state through render props. Especially useful for controlling arrays of controlled components. Written in TypeScript.

## Installation

```sh
yarn add react-state-render-prop
```

or

```sh
npm i react-state-render-prop
```

## Usage

```tsx
import { State } from 'react-state-render-prop';

const Example = () => {
return (



{(state, setState) => (
setState(state => state + 1)}>{state}
)}


);
};
```