Warning: Failed prop type: Invalid prop `colors` supplied to `Line`.
See original GitHub issueWith react
16.8.1, react-dom
16.8.1 and @nivo/line
0.56.0.
Providing a single hex code string to the colors
property results in PropTypes error:
Warning: Failed prop type: Invalid prop `colors` supplied to `Line`.
in Line (created by pure(Line))
in pure(Line) (created by withPropsOnChange(pure(Line)))
in withPropsOnChange(pure(Line)) (created by withPropsOnChange(withPropsOnChange(pure(Line))))
in withPropsOnChange(withPropsOnChange(pure(Line))) (created by withPropsOnChange(withPropsOnChange(withPropsOnChange(pure(Line)))))
in withPropsOnChange(withPropsOnChange(withPropsOnChange(pure(Line)))) (created by withPropsOnChange(withPropsOnChange(withPropsOnChange(withPropsOnChange(pure(Line))))))
in withPropsOnChange(withPropsOnChange(withPropsOnChange(withPropsOnChange(pure(Line))))) (created by withPropsOnChange(withPropsOnChange(withPropsOnChange(withPropsOnChange(withPropsOnChange(pure(Line)))))))
in
etc. etc. etc.
Example here https://codesandbox.io/s/p5y6l4wym
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Failed prop type: Invalid prop `value` of type `number ...
Warning : Failed prop type: Invalid prop `value` of type `number` supplied to `TextInput`, expected `string`. I have a postalCode and it is ......
Read more >Typechecking With PropTypes - React
When an invalid value is provided for a prop, a warning will be shown in the JavaScript console. For performance reasons, propTypes is...
Read more >Invalid props.style key 'textAlign' supplied to 'View'-Reactjs
Coding example for the question Failed prop type: Invalid props.style key 'textAlign' supplied to 'View'-Reactjs.
Read more >How to Use PropTypes in React - freeCodeCamp
PropTypes are a good first line defense when it comes to debugging your apps ... to make sure a warning is shown if...
Read more >FormidableLabs/victory - Gitter
victory/lib/index.js Module build failed: Error: [BABEL] ... Warning: Failed propType: Invalid undefined domain of type object supplied to VictoryAxis ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Because it’s not a valid colors property, even if it passes, if you want to use a single color, you should use
colors={() => 'red'}
plain color is supported for inherited colors such as borders/links…Make sure that you provide the full property. e.g.
yScale={{ type: 'linear', min: 'auto', max: 'auto', stacked: false, reverse: false, }}