Skip to content

Commit

Permalink
chore: rename package (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoishin authored Jan 1, 2024
1 parent 22fa294 commit 33a7261
Show file tree
Hide file tree
Showing 6 changed files with 9,743 additions and 5,486 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build
- run: npm ci
- run: npm run test
- run: npm run build
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: release-please
with:
release-type: node
package-name: use-nodecg
package-name: '@nodecg/react-hooks'

publish:
needs: release-please
Expand All @@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts
- run: yarn install --frozen-lockfile
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# use-nodecg
# @nodecg/react-hooks

This package is a collection custom hooks of [React Hooks](https://reactjs.org/docs/hooks-intro.html) for NodeCG API.

Expand All @@ -7,11 +7,11 @@ This package is a collection custom hooks of [React Hooks](https://reactjs.org/d
## Install

```sh
npm install use-nodecg
npm install @nodecg/react-hooks
# or
yarn add use-nodecg
yarn add @nodecg/react-hooks
# or
pnpm add use-nodecg
pnpm add @nodecg/react-hooks
```

## About React Hooks
Expand Down Expand Up @@ -43,7 +43,7 @@ Use [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-reac
- Allows you to use replicant values in function component.

```tsx
import {useReplicant} from 'use-nodecg';
import {useReplicant} from '@nodecg/react-hooks';

// This component will re-render when the `counter replicant value changes
export function RunnerName() {
Expand All @@ -63,7 +63,7 @@ export function RunnerName() {
- Combining with other hooks enables powerful stateful features with function component

```tsx
import {useListenFor} from 'use-nodecg';
import {useListenFor} from '@nodecg/react-hooks';

// Shows modal for 1 second when NodeCG receives 'errorHappened' message from the server
export function AlertOnMessage() {
Expand Down
Loading

0 comments on commit 33a7261

Please sign in to comment.