Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>React-Js SnippetsNew to Visual Studio Code? Get it now.
React-Js Snippets

React-Js Snippets

beqa dogonadze

|
2,068 installs
| (2) | Free
Snippets for Javascript and React to make your coding journey easy
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This extension is focused on Javascript and React.

If you have any idea about any feature and want to see it, contact me by email, i will try my best beqadogonadze328@gmail.com

-See detailed description-
https://github.com/beqa-dogonadze/React-Js-Snippets#readme

fl creates a for loop

for (let i = 0; i < arg; i++) {
  ///
}

fn creates a function component

const App = () => {
  return <div>Start</div>
}
export default App

each creates a forEach function

forEach((el) => {
  return
})

ter ternary operator

condtion ? true : false
import useState from 'react'

use creates a useState hook

const [count, setCount] = useState(0)

arf creates arrow function

const hello = () => {
  return
}

eff creates useEffect hook

useEffect(() => {
  ///
})

imeff impoerts useEffect

import useEffect from 'react'

arr creates empty array

const arr = []

cl creates console.log function

console.log()

javafet creates API request using fetch

useEffect(() => {
  fetch('https://dog.ceo/api/breeds/image/random')
    .then((response) => response.json())
    .then((data) => setFunction(data.message))
}, [])

axi creates API request using axios

useEffect(() => {
  axios
    .get(request.requestName)
    .then((response) => setFunction(response.data.results))
}, [])

imax import axios

import axios from 'axios'

ed export default

export default
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft