Skip to content

Conversation

S4r4h-O
Copy link

@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
Author

S4r4h-O commented Oct 6, 2025

Sarah added 4 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
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