Skip to content

Deprecated PropType #14

@milesj

Description

@milesj

A new PropType for denoting a prop as deprecated would be useful in slowly migrating components. It would simply call console.warn in non-production and pass through the original PropType.

Something like the following:

import { deprecated } from 'airbnb-prop-types';

const propTypes = {
  title: deprecated(PropTypes.string, 'Please use "children" instead.'),
  children: PropTypes.node,
};

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions