Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>no-fuss-react-snippetsNew to Visual Studio Code? Get it now.
no-fuss-react-snippets

no-fuss-react-snippets

Box-Of-Hats

|
176 installs
| (0) | Free
A small collection of simple react snippets that you will actually use
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

no-fuss-react-snippets

A small collection of simple react snippets that you will actually use.

Support for both JSX and TSX (typescript).

Snippets

Import

import React from "react";

Functional component

export const ComponentName = props => {
    return <></>;
};

Arrow function

const FunctionName = args => {};

Use State

const [PropName, setPropName] = useState(InitialValue);

Use Effect

useEffect(() => {}, []);

Material Icon

For use with material.io. Icon name options are provided as a list.

<i className="material-icons">settings</i>

Fragment

<></>

Typescript snippets

Some snippets have slightly altered snippets when typescript is being used.

Functional component (TS)

interface ComponentNameProps {}

export const ComponentName = (props: ComponentNameProps) => {
    return <></>;
};

Use State (TS)

const [PropName, setPropName] = useState<Type>();
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft