refactor_component
Refactor React Native component code to improve performance, maintainability, accessibility, type safety, or modern patterns. Specify target RN version and optionally include test updates.
Instructions
Provide expert-level refactoring suggestions and implementations
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"refactor_type": "<refactor_type>"
},
"name": "refactor_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | React Native component code to refactor | |
| refactor_type | Yes | Type of refactoring to apply | |
| target_rn_version | No | Target React Native version for refactoring | |
| include_tests | No | Whether to include test updates |