PR

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
1
Weekly
0
Open issues
0
Bundle
~60 kB

Installation

npm install prop-types-exact

Code 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
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 0 open issues on GitHub

FAQs

Alternatives & similar libraries