Part of the Ant Design ecosystem.
🔁 Performant React context selector utilities for rc-component packages.
English | 简体中文
| Area | Support |
|---|---|
| Purpose | Performant React context selector utilities for rc-component packages. |
| Package | @rc-component/context |
| Release | @rc-component/np / rc-np |
npm install @rc-component/contextimport { createContext } from '@rc-component/context';
const [Provider, useContext] = createContext({ count: 0 });
export { Provider, useContext };| API | Description |
|---|---|
createContext(defaultValue) |
Create a provider and selector-aware context hook. |
npm install
npm start
npm test
npm run lint
npm run tsc
npm run compileThe dumi site runs at http://localhost:8000.
npm run prepublishOnlyThe release flow is handled by @rc-component/np through the rc-np command when the package uses the shared release flow.
@rc-component/context is released under the MIT license.