https://github.com/pomber/louis-xiv
React state as a component
https://github.com/pomber/louis-xiv
component function-as-child react render-props state
Last synced: about 1 month ago
JSON representation
React state as a component
- Host: GitHub
- URL: https://github.com/pomber/louis-xiv
- Owner: pomber
- License: mit
- Created: 2018-04-02T15:03:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T14:35:05.000Z (over 6 years ago)
- Last Synced: 2025-04-19T20:11:30.567Z (about 1 month ago)
- Topics: component, function-as-child, react, render-props, state
- Language: JavaScript
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
> The state? I am the state.
>
> — Louis XIV---
### 🛑 Deprecated
---
## Usage
[](https://www.npmjs.com/package/louis-xiv)
Install:
```
$ yarn add louis-xiv
```Use:
```js
import React from "react";
import { render } from "react-dom";
import State from "louis-xiv";const App = () => (
({
...state,
increment: () => setState(prev => ({ counter: prev.counter + 1 }))
})}
>
{({ counter, increment }, setState, deferredSetState) => (
{counter}
+
)}
);render(, document.getElementById("root"));
```## Similar
* https://github.com/reactions/component
## License
Released under MIT license.