Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/bgalek/react-contexts


https://github.com/bgalek/react-contexts

Last synced: 2 days ago
JSON representation

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
```