@crabas0npm/corporis-labore-corporis
v1.0.0
Published
[![Build Status][travis-svg]][travis-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-image]][downloads-url]
Downloads
3
Maintainers
Keywords
Readme
@crabas0npm/corporis-labore-corporis
For use with React PropTypes. Will error on any prop not explicitly specified.
Usage
import PropTypes from 'prop-types';
import exact from '@crabas0npm/corporis-labore-corporis';
function Foo({ foo, bar }) {
return <div>{foo}{bar}</div>
}
Foo.propTypes = exact({
foo: PropTypes.string,
bar: PropTypes.number,
});
<Foo foo="hi" bar={3} /> // no warnings
<Foo foo="hi" bar={3} baz="extra" /> // propTypes warning!
Tests
Simply clone the repo, npm install
, and run npm test