{"id":15386728,"url":"https://github.com/chrvadala/react-refactor","last_synced_at":"2025-04-15T17:34:00.161Z","repository":{"id":57343382,"uuid":"109893173","full_name":"chrvadala/react-refactor","owner":"chrvadala","description":":wrench: Convert your React Class Component to Functional Component and vice-versa","archived":false,"fork":false,"pushed_at":"2018-07-29T15:07:58.000Z","size":2477,"stargazers_count":16,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T11:42:43.397Z","etag":null,"topics":["component-builder","react","refactoring-tools","tools"],"latest_commit_sha":null,"homepage":"https://chrvadala.github.io/react-refactor","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/chrvadala.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-11-07T21:30:13.000Z","updated_at":"2023-12-05T07:46:47.000Z","dependencies_parsed_at":"2022-09-12T07:00:27.678Z","dependency_job_id":null,"html_url":"https://github.com/chrvadala/react-refactor","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrvadala%2Freact-refactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrvadala%2Freact-refactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrvadala%2Freact-refactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrvadala%2Freact-refactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrvadala","download_url":"https://codeload.github.com/chrvadala/react-refactor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223681406,"owners_count":17184945,"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":["component-builder","react","refactoring-tools","tools"],"created_at":"2024-10-01T14:50:18.447Z","updated_at":"2024-11-08T12:02:39.130Z","avatar_url":"https://github.com/chrvadala.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-refactor\n[![Build Status](https://travis-ci.org/chrvadala/react-refactor.svg?branch=master)](https://travis-ci.org/chrvadala/react-refactor)\n[![Beerpay](https://beerpay.io/chrvadala/react-refactor/badge.svg?style=beer)](https://beerpay.io/chrvadala/react-refactor)\n\nHow many times have you converted a **React Class component** to a **React Functional component** and vice-versa? It’s a boring task, and we know...  \"*developers don’t like boring tasks*\".\nThanks to **React Refactor** you can convert any React component from and to Class component.\n\nIt's made with Babel Babylon and thanks to string replacing it’s able to instantly convert your component to the opposite kind of component that you provided.\n\n**React Refactor** is available in three different packages: Library, CLI, Web Interface\n\n## Library\n[![npm](https://img.shields.io/npm/v/react-refactor.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/react-refactor)\n[![Downloads](https://img.shields.io/npm/dm/react-refactor.svg)](https://www.npmjs.com/package/react-refactor)\n\nThe package *react-refactor* offers methods to programmatically convert a component. You can use it to make new useful utilities that integrate this ability.\n````js\nconst {execRefactor} = require('react-refactor')\nlet {output} = execRefactor(source)\n````\n\n\n## CLI\n[![npm](https://img.shields.io/npm/v/react-refactor-cli.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/react-refactor-cli)\n[![Downloads](https://img.shields.io/npm/dm/react-refactor-cli.svg)](https://www.npmjs.com/package/react-refactor-cli)\n\nYou can globally install the package **react-refactor-cli** and use it to convert your component on the fly.\n````\n$ yarn global add react-refactor-cli\n$ react-refactor [--output \u003cfilename\u003e] \u003cfilename\u003e\n````\n\n## Web interface\nYou can avoid installing anything and convert your component through the web interface available at [https://chrvadala.github.io/react-refactor/](https://chrvadala.github.io/react-refactor/)\n\n## Changelog\n- **v0.0** - Preview version\n- **v1.0** - First stable version\n\n## Run tests\n````\nyarn install\nyarn run bootstrap\nyarn build\nyarn test\nyarn run clean\n````\n\n## Contributors\n- [chrvadala](https://github.com/chrvadala) (author)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrvadala%2Freact-refactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrvadala%2Freact-refactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrvadala%2Freact-refactor/lists"}