score:5
Accepted answer
i think this is happening because you are setting isrequired
on the types inside of the oneoftype
. you should set it on the outer proptypes.
i think this might work
processinfovalues: proptypes.oneoftype([
proptypes.bool,
proptypes.object,
]).isrequired
Source: stackoverflow.com
Related Query
- PropTypes oneOfType isRequired
- propTypes isRequired constraint mis-leading behaviour in react
- PropTypes isRequired on React Router 4 params prop
- React - PropTypes not Enforcing isRequired
- Reactjs - proptypes check with oneOfType
- is specifying isRequired in Proptypes should come at last?
- ReactJs: What should the PropTypes be for this.props.children?
- React PropTypes: Allow different types of PropTypes for one prop
- PropTypes in a TypeScript React Application
- How do you validate the PropTypes of a nested object in ReactJS?
- PropTypes in functional stateless component
- React PropTypes vs. Flow
- PropTypes check of object with dynamic keys
- React: PropTypes in stateless functional component
- react: why static propTypes
- React props - set isRequired on a prop if another prop is null / empty
- static propTypes Vs React.PropTypes
- Is it OK to put propTypes and defaultProps as static props inside React class?
- React propTypes component class?
- React PropTypes DOM element?
- Force ReactJS to throw real errors when propTypes validation fails?
- React linter airbnb proptypes array
- Disable React.createClass and PropTypes deprecated warnings in babel react present
- Accessing PropTypes via the main React package is deprecated
- How to test React PropTypes through Jest?
- Using forwardRef with proptypes and eslint
- What is the importance of PropTypes in React?
- What is the importance of PropTypes in React?
- The right React Component PropTypes for es6 (Weak) Maps, Sets
- Proptypes for custom react hooks
More Query from same tag
- Reactjs : Header in axios
- ReactJs lazy when trying to use lazy loading, getting 'window; is not defined error
- styled components - passing props to GlobalStyle
- How to disable rendering of parent element if child attribute is true
- Dynamically creating refs without strings
- react js variable can not shown in alert
- Is there a way that reactJS hides the text when he goes into the next line?
- React-Redux Action: 'Dispatch' is not a function
- Array of components in ReactJS
- Calling componentDidMount inside a class Component's function
- React couldn't read the state
- accordion items are repeated
- When I create a variable to a function using "await", this function runs immediately or just when I call this variable?
- ReactJS function is not being called
- Webpack log errors "net::ERR_SSL_PROTOCOL_ERROR" by calling sockjs-node/info
- React - Redux wait fetch result before render component
- Material UI TableCell onclick not working
- React Location returns undefined
- how to create apollo client query with custom types
- array.map is not a function, reactjs setState error
- How to implement Counter on each item in the FlatList
- React-Bootstrap Badge is only white text no matter how I change its property. How to solve it?
- How to remove port from url for node application using nginx
- Return response.data in function inside .then callback | Axios
- Flask session not persisting, losing data on page refresh in SPA
- Search functionality in React
- Struggling in passing data from Child to Parent React Component. Cannot update a component (`App`) while rendering a different component (`Table`)
- Force React to fire event through injected JavaScript
- How to switch cameras in PWA app built with reactjs?
- (React) How to get the state of another component when a submit button is clicked?