Prop Types Exact
prop-types-exact
For use with React PropTypes. Will error on any prop not explicitly specified.
Utilities
react
propTypes
prop
types
validator
validation
exact
prop-types-exact
Utilities
javascript
Stars
237
Weekly
738k
Open issues
1
Bundle
~25 kB
Installation
npm install prop-types-exactCode example
import { usePropTypesExact } from "prop-types-exact";
export function Example() {
const value = usePropTypesExact();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Jordan Harband
- 738k 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
- 1 open issues on GitHub