{"id":15677790,"url":"https://github.com/jossmac/react-deprecate","last_synced_at":"2025-05-07T01:43:20.234Z","repository":{"id":57333137,"uuid":"114198958","full_name":"jossmac/react-deprecate","owner":"jossmac","description":"⚠️ Rename props with deprecation warning","archived":false,"fork":false,"pushed_at":"2017-12-26T22:41:32.000Z","size":47,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:53:14.704Z","etag":null,"topics":["deprecate","hoc","props","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jossmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-14T03:40:38.000Z","updated_at":"2023-08-18T10:10:12.000Z","dependencies_parsed_at":"2022-08-24T18:30:53.880Z","dependency_job_id":null,"html_url":"https://github.com/jossmac/react-deprecate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-deprecate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-deprecate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-deprecate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-deprecate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jossmac","download_url":"https://codeload.github.com/jossmac/react-deprecate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798495,"owners_count":21805876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecate","hoc","props","react"],"created_at":"2024-10-03T16:11:47.669Z","updated_at":"2025-05-07T01:43:20.213Z","avatar_url":"https://github.com/jossmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Deprecate\n\nHigher order component to support old props and warn users about the prop change.\n\n## Install\n\n```bash\nyarn add react-deprecate\n```\n\n## Usage\n\n```jsx\nimport React, { Component } from 'react';\nimport renamePropsWithWarning from 'react-deprecate';\n\n// Your component with the breaking name change\nclass LibComponent extends Component {\n  static propTypes = { label: PropTypes.string }\n  render () {\n    return \u003cspan\u003e{this.props.label}\u003c/span\u003e;\n  }\n}\n\n// Wrapped, with options `old` --\u003e `new`.\n// Optional third argument is a custom message renderer.\nexport default renamePropsWithWarning(\n  LibComponent,\n  { description: 'label', val: 'value' },\n  ({ componentName, prop, renamedProps }) =\u003e 'Your message.'\n);\n\n// Old AND new props supported:\n// `description/val` mapped to `label/value` with a console warning in Development\nclass UserComponent extends Component {\n  render () {\n    return \u003cLibComponent description=\"Some text\" /\u003e;\n  }\n}\n```\n\n## License\n\nCopyright \u0026copy; 2017 Joss Mackison. MIT Licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-deprecate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjossmac%2Freact-deprecate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-deprecate/lists"}