https://github.com/thammami01/react-ts-code-snippets
React/TypeScript Code Snippets Extension for Visual Studio Code.
https://github.com/thammami01/react-ts-code-snippets
collaborate communityexchange github react-ts snippets student-vscode vscode-extension
Last synced: 5 months ago
JSON representation
React/TypeScript Code Snippets Extension for Visual Studio Code.
- Host: GitHub
- URL: https://github.com/thammami01/react-ts-code-snippets
- Owner: THammami01
- License: mit
- Created: 2023-03-06T09:33:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T23:46:10.000Z (almost 3 years ago)
- Last Synced: 2024-11-14T12:30:58.254Z (about 1 year ago)
- Topics: collaborate, communityexchange, github, react-ts, snippets, student-vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=THammami01.react-ts-code-snippets
- Size: 118 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# React TS Code Snippets for VS Code
All abbreviations share a
`rt` (for React TS) prefix.
## rtfc - Functional Component
```tsx
import type { FC } from 'react';,
interface |Props {|}
const |: FC<|Props> = (|) => {
return (|);
}
export default |;
```
## rtus - useState Hook
```tsx
const [|, set|] = useState(|);
```
## rtue - useEffect Hook
```tsx
useEffect(() => {
|
}, [|]);
```
## rtif - Import From
```tsx
import | from '|';
```
## rtipf - Import Props From
```tsx
import { | } from '|';
```
## rtxc - Export Const
```tsx
export const | = |;
```
## rtxd - Export Default
```tsx
export default |;
```
## rtxaf - Export All From
```tsx
export * from "|";
```
## rtxdf - Export Default From
```tsx
export { default } from "|";
```
## rtxdaf - Export Default As From
```tsx
export { default as | } from '|';
```