Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgalek/react-contexts
https://github.com/bgalek/react-contexts
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bgalek/react-contexts
- Owner: bgalek
- Created: 2022-11-30T00:09:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T08:40:18.000Z (over 1 year ago)
- Last Synced: 2024-04-14T12:52:08.559Z (7 months ago)
- Language: TypeScript
- Size: 570 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![npm](https://img.shields.io/npm/v/@bgalek/react-contexts)
# react-contexts
```shell
npm i @bgalek/react-contexts
```Useful, generic react contexts for everyday use.
## UserSettingsProvider
User settings for your app, stored in local storage.
Provider:
```js
```
Hook:
```js
const { settings, setSettings } = useLocalUserSettings>();
{JSON.stringify(settings)}
setSettings("favouriteNumber", Math.random())}>Change number
```