1.0.2 • Published 4 years ago
@nosocks/propertypes v1.0.2
About The Project
To get a local copy up and running follow these simple steps.
Required dependencies
prop-types: ^15.7.2
react: ^17.0.2
Usage
Use this package instead of prop-types
:
// Component.jsx
import Proptypes, { string } from 'propertypes'
Component.propTypes = {
x: string
}
// Other
Component.propTypes.x.info.type === 'string'
Know Issues
- There is no way to check if a prop is required, I'm currently fixing this.
License
Distributed under the MIT License. See LICENSE
for more information.