Skip to content

Commit 0874c9e

Browse files
committed
Merge branch 'main' of https://github.com/bit-about/state
2 parents b7117fa + 095345b commit 0874c9e

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
with:
4141
node-version: 16
4242
registry-url: https://registry.npmjs.org/
43+
- name: Update package.json version on release
44+
uses: medallyon/update-package-version-on-release@v1
4345
- run: npm ci
4446
- run: npm publish --access=public
4547
env:

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# <p align="center">BitAboutState</p>
21
<p align="center">
3-
<img alt="" src="https://user-images.githubusercontent.com/1496580/160495578-c4a54e53-7c5f-4bc3-9db3-a45c6ed45394.png" /><br/>
2+
<img alt="" src="https://user-images.githubusercontent.com/1496580/162103874-f2fbde4b-f985-4c33-ac38-9d5d3b4ee37e.png" /><br/><br/>
43
<a href="https://www.npmjs.com/package/@bit-about/state"><img alt="" src="https://img.shields.io/npm/v/@bit-about/state.svg" /></a>
54
<img alt="Bundle size" src="https://img.shields.io/bundlephobia/min/@bit-about/state?label=size" />
6-
<a href="https://codecov.io/gh/bit-about/state"><img alt="" src="https://codecov.io/gh/bit-about/state/branch/main/graph/badge.svg?token=BuGi92VqnL" /></a>
7-
<br />
8-
🚀 Tiny and powerful React hook-based state management library.<br />
9-
100% Idiomatic React.<br />
5+
<a href="https://codecov.io/gh/bit-about/state"><img alt="" src="https://img.shields.io/codecov/c/github/bit-about/state?token=BuGi92VqnL" />
106
</p>
117

128
## Install
139

1410
```bash
15-
npm install --save @bit-about/state
11+
npm i @bit-about/state
1612
```
1713

1814
## Features
@@ -23,7 +19,7 @@ npm install --save @bit-about/state
2319
- State on hook
2420
- ...with static access
2521
- No centralized state provider
26-
- Tiny - only **100KB**
22+
- Tiny - only **2.6kB**
2723
- **Just works**
2824

2925
## Usage
@@ -171,12 +167,10 @@ const [UserProvider, useUser] = state(
171167

172168
```tsx
173169
import { useQuery } from 'react-query'
174-
import { fetchUser } from './user.ts'
175-
176-
type UserProfileHookProps = { id: number }
170+
import { fetchUser } from './user'
177171

178172
const [UserProvider, useUser] = state(
179-
({ id }: UserProfileHookProps) => {
173+
({ id }) => {
180174
const { data: user } = useQuery(['user', id], () => fetchUser(id))
181175
return { user }
182176
}

0 commit comments

Comments
 (0)