Top "React-proptypes" questions

This tag should be used if the question involves the type-checking system of React.

React PropTypes vs. Flow

PropTypes and Flow cover similar things but are using different approaches. PropTypes can give you warnings during runtime, which can …

reactjs flowtype react-proptypes
Accessing PropTypes via the main React package is deprecated

I'm using redux but when I run my code I have this error: Accessing PropTypes via the main React package …

javascript reactjs redux react-proptypes
Redux-form, Invalid prop 'value' of type 'number' supplied to 'TextInput', expected 'string'

I am using a custom component in a redux-form field as follows. <Field name="height" parse={value => Number(…

reactjs react-native redux-form react-proptypes
React PropTypes DOM element?

How do I mark a property as having to be a DOM element? This page says that PropTypes.element is …

reactjs react-proptypes
React proptypes component vs element

What is the difference between : var Icon = React.createClass({ propTypes: { name: React.PropTypes.string }, render: function(){ return ( <span className={…

reactjs react-proptypes
react: why static propTypes

I am looking the redux todomvc codes. What is the static keyword in static propTypes? Thanks UPDATE No idea why …

reactjs redux react-proptypes
PropTypes React Native is not an object

I have a problem with PropTypes in react native my code : import React, { Component, PropTypes } from 'react'; import { Text } from …

reactjs react-native native react-proptypes
ESLint React PropTypes, 'prop' is missing in prop validation

I have a stateless react component import React from 'react' import styled from 'styled-components'; import PropTypes from 'prop-types'; export default …

reactjs eslint react-proptypes eslint-config-airbnb
React.PropTypes array with specific length

Is it possible to use React.PropTypes to enforce length's on an array? Here is a very simple case: const …

reactjs react-proptypes
Passing Proptypes.shape to Proptypes.arrayOf in react

I have created two models State and City in separate files. Importing City in the State. State can have an …

reactjs react-proptypes