Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead. #47

Open
yotiwolf opened this issue Feb 27, 2024 · 0 comments

Comments

@yotiwolf
Copy link

I'm getting the defaultProps warning for CircularTrack and CircularProgress.

Warning: CircularTrack: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Warning: CircularProgress: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

I've attempted to modify the code like the below, but no luck. Does anyone have any ideas on how to resolve this?

import { CircularTrack } from 'react-circular-input';

const ModifiedCircularTrack = ({
  stroke='#fff',
  fill='#fff',
  strokeWidth='1',
  strokeLinecap='round',
  ...props
}) => {
  return (
    <CircularTrack
      stroke={stroke}
      fill={fill}
      strokeWidth={strokeWidth}
      {...props}
    />
  );
};

export default ModifiedCircularTrack;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant