React to Code
summary
A small tool called react sourcer parses source into an AST provider via Babylon and keeps that tree as state; matchers run over every node using Babel types to detect patterns like importing lodash, calls to _.forEach, and line numbers for each hit. It can rewrite code (replace lodash usage with the native forEach), compose scope and nested matches to handle aliasing, and emits a history of edits; a GitHub repo link is provided and examples run end to end.
AI-written summary · about
chapters (5)
- 0:00Start
- 3:04Prebuilt Matchers
- 3:31Scoped Matches
- 4:10Nested Matches
- 4:56Thank You Organizers & Audience
related talks
01h 09mBabel: A refactoring tool
34mDon’t (re)write code. Let AST do it
20mThey see me refactorin'. They hatin'
12mCodecrumbs in React
25mReact Compiler Internals
25mBeautiful Abstractions "What I Learned Reading the Source-Code of 18 React Libraries"
29mMy Little Parser: Tooling is Magic
19mWhat's next for the React Compiler?
