Socket
Socket
Sign inDemoInstall

react-immutable-proptypes

Package Overview
Dependencies
35
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-immutable-proptypes

PropType validators that work with Immutable.js.


Version published
Weekly downloads
380K
increased by3.92%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-immutable-proptypes

PropType validators that work with Immutable.js.

About

I got tired of seeing React.PropTypes.instanceOf(Immutable.List) or React.PropTypes.instanceOf(Immutable.Map) as PropTypes for components that should be specifying an Immutable.List of something or an Immutable.Map shape. A little "googling" came up with empty, unless you want to use Flow, which I do not. So, I wrote react-immutable-proptypes.

Usage is simple:

var ImmutablePropTypes = require('react-immutable-proptypes');
var MyReactComponent = React.createClass({
  // ...
  propTypes: {
    myImmutableList: ImmutableTypes.listOf(
      ImmutableTypes.shape({
        someNumberProp: React.PropTypes.number.isRequired
      })
    )
  }
  // ...
});

Please send a message or, better yet, create an issue/pull request if you know a better solution, find bugs, or want to add a feature.

Installing

Installing via npmjs

npm install --save react-immutable-proptypes

Keywords

FAQs

Last updated on 28 Mar 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc