An open API service indexing awesome lists of open source software.

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: 17 days ago
JSON representation

React/TypeScript Code Snippets Extension for Visual Studio Code.

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 '|';
```