Skip to content

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

@yotiwolf

Description

@yotiwolf

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions