New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kaizen/react-deprecate-warning

Package Overview
Dependencies
Maintainers
10
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaizen/react-deprecate-warning

React Deprecated Warning is a higher order component that warns that a component is deprecated. This works with both deprecated components, and deprecated props.

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
717
decreased by-10.37%
Maintainers
10
Weekly downloads
 
Created
Source

React Deprecate Warning

React Deprecated Warning is a higher order component that warns that a component is deprecated. This works with both deprecated components, and deprecated props.

Install

yarn add @kaizen/react-deprecate-warning

Usage

Deprecate a component

withDeprecatedComponent(YourComponent, {
  warning: 'This component is deprecated, use ComponentB instead',
})

Deprecate a prop

withDeprecatedProp(YourComponent, {
  warning: {
    test: "test is deprecated, use anotherProp instead",
  },
})

Deprecate values within a prop

withDeprecatedProp(YourComponent, {
  warning: {
    variant: [
      {
        key: "original",
        warning: "original is deprecated, use prominent instead",
      },
      {
        key: "zen",
        warning: "zen is deprecated, use default instead",
      },
    ],
  },
})

<YourComponent variant="default"> // fine, no warning
<YourComponent variant="original"> // warning, logs "original is deprecated, use prominent instead"

FAQs

Package last updated on 10 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc