React18 lifecycle patterns vs React19 source patterns
React18 lifecycle patterns is an open-source agent skill for developer tools. React19 source patterns is an open-source agent skill for developer tools.
- React18 lifecycle patterns is best for migrate componentwillmount to componentdidmount in a class component.
- React19 source patterns is best for migrate a legacy reactdom.render entry point to createroot.
- What it is
- React18 lifecycle patterns is an open-source agent skill for developer tools.React19 source patterns is an open-source agent skill for developer tools.
- Best for
- Migrate componentWillMount to componentDidMount in a class componentMigrate a legacy ReactDOM.render entry point to createRoot
- Kind
- SkillSkill
- Pricing
- Open sourceOpen source
- Platforms
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, GooseClaude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- GitHub stars
- 41.3K41.3K
- Last commit
- Nov 2026Nov 2026
- License
- MITMIT
- Open source
- Good for
- Migrate componentWillMount to componentDidMount in a class component; Decide between getDerivedStateFromProps and componentDidUpdate for a prop change; Replace componentWillUpdate with getSnapshotBeforeUpdate to preserve scroll positionMigrate a legacy ReactDOM.render entry point to createRoot; Replace string refs with createRef across a component codebase; Convert defaultProps to default parameters in function components
What React18 lifecycle patterns does
Lifecycle method routing
Maps each unsafe method to the correct replacement based on what the code does.
Before and after examples
Reference files provide migration code cases for each of the three methods.
getDerivedStateFromProps guidance
Explains when derived state is appropriate and warns about common traps.
getSnapshotBeforeUpdate pairing
Shows how to read DOM state before updates and pair it with componentDidUpdate.
UNSAFE_ prefix caution
Explains why the prefix is only a temporary measure and how to mark it.
What React19 source patterns does
Deprecated API replacements
Maps removed React APIs such as ReactDOM.render and findDOMNode to their React 19 equivalents.
Ref handling updates
Covers moving from forwardRef wrappers and string refs to ref props and createRef.
Context migration
Explains replacing legacy context with createContext, including cross-file provider and consumer changes.
defaultProps conversion
Describes replacing component defaultProps with ES6 default parameters and their edge cases.
PropTypes handling
Keeps propTypes assignments and adds a comment noting they are no longer checked at runtime.
Unused React import cleanup
Removes unused React default imports only when the file has no React. references.
React18 lifecycle patterns vs React19 source patterns: questions
Is React18 lifecycle patterns or React19 source patterns cheaper?
Both are open source. Compare current plans on each official site.
What is the difference between React18 lifecycle patterns and React19 source patterns?
React18 lifecycle patterns is an open-source agent skill for developer tools. React19 source patterns is an open-source agent skill for developer tools.
