{"id":13518293,"url":"https://github.com/MicheleBertoli/react-fix-it","last_synced_at":"2025-03-31T09:31:24.308Z","repository":{"id":40002830,"uuid":"76542391","full_name":"MicheleBertoli/react-fix-it","owner":"MicheleBertoli","description":"Automagically generate tests from errors","archived":false,"fork":false,"pushed_at":"2018-09-24T03:54:20.000Z","size":613,"stargazers_count":1909,"open_issues_count":1,"forks_count":21,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-03-25T01:39:54.339Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://michelebertoli.github.io/react-fix-it/","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/MicheleBertoli.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":"2016-12-15T08:59:34.000Z","updated_at":"2025-02-14T15:52:27.000Z","dependencies_parsed_at":"2022-06-26T06:38:50.499Z","dependency_job_id":null,"html_url":"https://github.com/MicheleBertoli/react-fix-it","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicheleBertoli%2Freact-fix-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicheleBertoli%2Freact-fix-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicheleBertoli%2Freact-fix-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicheleBertoli%2Freact-fix-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicheleBertoli","download_url":"https://codeload.github.com/MicheleBertoli/react-fix-it/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246446901,"owners_count":20778891,"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":[],"created_at":"2024-08-01T05:01:43.323Z","updated_at":"2025-03-31T09:31:23.782Z","avatar_url":"https://github.com/MicheleBertoli.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# React Fix It [![Build Status](https://travis-ci.org/MicheleBertoli/react-fix-it.svg?branch=master)](https://travis-ci.org/MicheleBertoli/react-fix-it)\nAutomagically generate tests from errors.\n\n:warning: This package uses [react-component-errors](https://github.com/staxmanade/react-component-errors) to wrap the lifecycle methods into a try...catch block, which affects the performance of your components. Therefore it should **not** be used in production.\n\n## How to use it\n\n- Enhance your components with `fixIt`\n- Write some bugs (or wait for your components to fail)\n- Open the console and copy the test snippet\n- Paste the code to reproduce the error\n- Fix the bugs and celebrate\n\n## Demo\n\n[https://michelebertoli.github.io/react-fix-it/](https://michelebertoli.github.io/react-fix-it/)\n\n![Preview](demo/preview.gif)\n\n## Installation\n\n\u003e You can either install it with [npm](https://nodejs.org) or [yarn](https://yarnpkg.com).\n\n```sh\nnpm install --save-dev react-fix-it\n```\nor\n```sh\nyarn add --dev react-fix-it\n```\n\n## Example\n\n```jsx\nimport React, { Component } from 'react'\nimport fixIt, { options } from 'react-fix-it'\n\n// defaults to console.log\noptions.log = (test) =\u003e {\n  console.warn(test)\n  doWatheverYouWant(test)\n}\n\nclass MyComponent extends Component {\n  render() {\n    return \u003cdiv\u003eHello ⚛\u003c/div\u003e\n  }\n}\n\nexport default fixIt(MyComponent)\n```\n\n:bulb: They easiest way to patch automatically all the components in development mode is by using [babel-plugin-react-fix-it](https://github.com/MicheleBertoli/babel-plugin-react-fix-it) with the following configuration:\n```json\n{\n  \"env\": {\n    \"development\": {\n      \"plugins\": [\"react-fix-it\"]\n    }\n  }\n}\n```\n\n## Test\n```sh\nnpm test\n```\nor\n```sh\nyarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMicheleBertoli%2Freact-fix-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMicheleBertoli%2Freact-fix-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMicheleBertoli%2Freact-fix-it/lists"}