Automagically generate tests from errors.
:warning: This package uses 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.
fixIthttps://michelebertoli.github.io/react-fix-it/

npm install --save-dev react-fix-it
or
yarn add --dev react-fix-it
import React, { Component } from 'react'
import fixIt, { options } from 'react-fix-it'
// defaults to console.log
options.log = (test) => {
console.warn(test)
doWatheverYouWant(test)
}
class MyComponent extends Component {
render() {
return
Hello ⚛
}
}
export default fixIt(MyComponent)
:bulb: They easiest way to patch automatically all the components in development mode is by using babel-plugin-react-fix-it with the following configuration:
{
"env": {
"development": {
"plugins": ["react-fix-it"]
}
}
}
npm test
or
yarn test
$ claude mcp add react-fix-it \
-- python -m otcore.mcp_server <graph>