Context
@rc-component/context
React way perf context selector
Component Libraries
react
react-component
context
@rc-component/context
Component Libraries
javascript
npm
frontend
open source
ui
Stars
447
Weekly
2.0M
Open issues
6
Bundle
~25 kB
Installation
npm install @rc-component/contextCode example
import { Button } from "@rc-component/context";
export function Example() {
return (
<div className="flex gap-2">
<Button>Primary</Button>
<Button variant="outline">Secondary</Button>
</div>
);
}Pros & cons
Pros
- Actively maintained by zombiej
- 2.0M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 6 open issues on GitHub