Extends HTML snippets to JSX/TSX languages#605
Open
S4r4h-O wants to merge 10 commits intorafamadriz:mainfrom
Open
Extends HTML snippets to JSX/TSX languages#605S4r4h-O wants to merge 10 commits intorafamadriz:mainfrom
S4r4h-O wants to merge 10 commits intorafamadriz:mainfrom
Conversation
added 3 commits
October 5, 2025 11:13
Justification: compatibility with React JSX
Author
…mponent exports - Remove class component snippets (rcc, rcjc, rccp, rcfc) - deprecated since React 16.8 Hooks introduction - Remove deprecated lifecycle methods (componentWillMount, componentWillReceiveProps, componentWillUpdate) - incompatible with React 18+ Concurrent Mode - Remove all PropTypes snippets - TypeScript provides superior compile-time type checking, making runtime PropTypes validation redundant - Remove class-specific destructuring helpers (this.props/this.state) and setState methods - only relevant for class components - Remove library-specific snippet (rfce with Emotion) - not generic enough for core collection - Keep valid class lifecycle methods (componentDidMount, componentDidUpdate, componentWillUnmount, getDerivedStateFromProps, shouldComponentUpdate) for legacy class components that still exist in codebases - Keep modern hooks (useState, useEffect, useContext, useRef, useCallback, useMemo), generic JSX helpers, and testing blocks - Add modern TypeScript component export patterns (erc, erct, edrc, edrct, edrac, edract) aligned with current React best practices
KSayanta
added a commit
to KSayanta/friendly-snippets
that referenced
this pull request
Mar 17, 2026
Extends HTML snippets to JSX/TSX languages rafamadriz#605
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends HTML snippets to JSX/TSX languages (javascriptreact, typescriptreact) for correct handling of self-closing elements and tag completions in React components. React uses JSX, which reuses HTML-like syntax but requires XML-style self-closing tags.