0.4.0 • Published 1 year ago

use-nodecg v0.4.0

Weekly downloads
30
License
MIT
Repository
github
Last release
1 year ago

use-nodecg

This package is a collection custom hooks of React Hooks for NodeCG API.

🚨 This package is in alpha state, as well as the React Hooks API itself. Do not use in production. But feel free to try out and file an issue for suggestion/bugs!

Install

npm install use-nodecg@next
# or
yarn add use-nodecg@next

Usage

useReplicant

  • Subscribes to specified replicant and returns the value as state.
  • Allows you to use replicant values in function component.
import {useReplicant} from 'use-nodecg';

// This component will re-render when the `currentRun` replicant value changes
export function RunnerName() {
	const currentRun = useReplicant('currentRun');
	return <div>{currentRun.runner.name}</div>;
}

License

MIT © Keiichiro Amemiya (Hoishin)

0.4.1-2

1 year ago

0.4.1-1

5 years ago

0.4.1-0

5 years ago

0.4.0

5 years ago

0.3.1-alpha.1

5 years ago

0.3.1-alpha.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.1.0-0

5 years ago

0.0.1-4

5 years ago

0.0.1-2

5 years ago

0.0.1-0

5 years ago