Skip to content

react-component/context

Repository files navigation

@rc-component/context

Ant Design Part of the Ant Design ecosystem.

🔁 Performant React context selector utilities for rc-component packages.

NPM version npm downloads build status Codecov bundle size dumi

English | 简体中文

Highlights

Area Support
Purpose Performant React context selector utilities for rc-component packages.
Package @rc-component/context
Release @rc-component/np / rc-np

Install

npm install @rc-component/context

Usage

import { createContext } from '@rc-component/context';

const [Provider, useContext] = createContext({ count: 0 });

export { Provider, useContext };

API

API Description
createContext(defaultValue) Create a provider and selector-aware context hook.

Development

npm install
npm start
npm test
npm run lint
npm run tsc
npm run compile

The dumi site runs at http://localhost:8000.

Release

npm run prepublishOnly

The release flow is handled by @rc-component/np through the rc-np command when the package uses the shared release flow.

License

@rc-component/context is released under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

9 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Generated from react-component/align