Babel plugin to instrument React components with custom transforms
59
Evaluation — 59%
↑ 1.47xAgent success when using this tile
Develop a small Babel-based helper that wraps React class components with configured transform wrappers during compilation while leaving non-component code untouched.
@generates
/**
* Transforms JSX/ES6 source so React class components are wrapped with configured transforms.
* @param {string} sourceCode - The source text containing potential React class components.
* @param {string} filename - Used for deterministic component identifiers in generated wrappers.
* @returns {string} The transformed source with wrapper calls.
*/
export function instrumentSource(sourceCode, filename);Wraps React components with configured transforms during Babel compilation.
Runs the transform pipeline that applies the plugin and returns transformed code.
Parses JSX in the source being transformed.
Install with Tessl CLI
npx tessl i tessl/npm-babel-plugin-react-transformevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9