Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Snippets for reactNew to Visual Studio Code? Get it now.
Snippets for react

Snippets for react

rafael fernandes

|
173 installs
| (0) | Free
Extention of the react snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Snippets for react

Extension with a snippet package for React development.

Features

Javascript

Snippet Renders
imr import
usf useState
uef useEffect
fcd Function Component export Default
fc Function Component export
cp Context Provider

imr - import

  import React from 'react'

usf - useState

  const [, set] = useState()

uef - useEffect

  useEffect(() => {

  }, [])

fcd - Function Component export Default

export default function () {

  return (
    <>

    </>
  )
}

fc - Function Component export

export function () {

  return (
    <>

    </>
  )
}

cp - Context Provider

import { createContext } from 'react'

export const  = createContext();

export default function Provider({ children }){
  const  = {};

  return (
    <.Provider value={{}}>
      {children}
    </.Provider>
  );
}

Typescript

Snippet Renders
imr import
usf useState
uef useEffect
fcd Function Component export Default
fc Function Component export
cp Context Provider
tp Type
itr Interface

imr - import

  import React from 'react'

usf - useState

  const [, set] = useState<>()

uef - useEffect

  useEffect(() => {

  }, [])

fcd - Function Component export Default

type Props = {

}

export default function ({}: Props): JSX.Element {

  return (
    <>

    </>
  )
}

fc - Function Component export

type Props = {

}

export function ({}: Props): JSX.Element {

  return (
    <>

    </>
  )
}

cp - Context Provider

import { createContext } from 'react'

type Props = {
  children: React.ReactNode
}

export const  = createContext();

export default function Provider({ children }: Props){
  const  = {};

  return (
    <.Provider value={{}}>
      {children}
    </.Provider>
  );
}

tp - type

type  = {

}

itr - Interface

interface  {

}

Jest

Snippet Renders
dsc Describe
it It
test Test Block
afta AfterAll
aft AfterEach
befa BeforeAll
bef BeforeEach

dsc - Describe

describe('',()=> {})

it - It

it('',()=> {})

test - Test

test('',()=> {})

afta - AfterAll

afterAll(() => {})

aft - AfterEach

afterEach(() => {})

befa - BeforeAll

beforeAll(() => {})

bef - BeforeEach

beforeEach(() => {})

Jest

Snippet Renders
arf Arrow function

dsc - Describe

  ()=> {}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft