[Bug] @primer/octicons-react: defaultProps is deprecated
bates64 opened this issue · 2 comments
bates64 commented
defaultProps
was recently deprecated in React: see facebook/react#16210.
Using any Octicon produces something like the following warning:
Warning: UploadIcon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
This is caused by the following code, which needs to be swapped out:
Angelfire commented
That's right, I'm getting the same error, I think the solution is easy, just use default parameters in the Icon
function, something like:
Icon({'aria-label': ariaLabel, tabIndex, className = defaultClassName, fill = 'currentColor', size = 16, verticalAlign = 'text-bottom'})
Or something like that...