Skip to content

Commit 07c306b

Browse files
committed
feat: First commit
0 parents  commit 07c306b

27 files changed

+6935
-0
lines changed

.github/workflows/npm.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Build and publish to npmjs
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm ci
16+
- run: npm run build
17+
- run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm ci
16+
- run: npm run test

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ide
2+
3+
.idea
4+
5+
# Node
6+
7+
node_modules
8+
dist
9+
10+
# Other
11+
12+
*.tmp.*

.npmignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Publish a clean package
2+
3+
.github
4+
.idea
5+
6+
docs
7+
node_modules
8+
src
9+
test
10+
11+
package-lock.json
12+
tsconfig.json

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
# 🚧 UNDER CONSTRUCTION 🚧
3+
4+
Welcome to `@reactit/hooks`, a great resource for useful `React` hooks.
5+
6+
# What is it
7+
8+
This package aims to become an exhaustive resource of pure react hooks.
9+
10+
# What is not
11+
12+
A repository of `React` components
13+
14+
15+
# Hooks
16+
17+
## Async
18+
19+
| Name | Behaviour | todo |
20+
|-----------------------|----------------------------------------------------------------------|------|
21+
| `usePromise` | Converts a promise to a sync function | |
22+
| | | |
23+
| `useSharedPromise` | | |
24+
| `useExclusivePromise` | | |
25+
| | | |
26+
| `useAsync` | Last call is the only one effective, all resolve individually | |
27+
| `useSharedAsync` | First call is the one effective, all resolve with the first value | |
28+
| `useSharedAsync2` | Last call is the only one effective, all resolve with the last value | |
29+
| | | |
30+
| `useQuery` | Similar to task, but runs when dependencies changes | |

0 commit comments

Comments
 (0)