Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename package #269

Merged
merged 3 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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