Skip to content

Extends HTML snippets to JSX/TSX languages#605

Open
S4r4h-O wants to merge 10 commits intorafamadriz:mainfrom
S4r4h-O:main
Open

Extends HTML snippets to JSX/TSX languages#605
S4r4h-O wants to merge 10 commits intorafamadriz:mainfrom
S4r4h-O:main

Conversation

@S4r4h-O
Copy link
Copy Markdown

@S4r4h-O S4r4h-O commented Oct 5, 2025

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.

@S4r4h-O
Copy link
Copy Markdown
Author

S4r4h-O commented Oct 6, 2025

Sarah and others added 7 commits October 6, 2025 15:54
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant