Coder Social home page Coder Social logo

sn1pp3ts's Introduction

Just my VScode snippets

To see all the information about the project, visit the Docs

Installation:

git clone [email protected]:x1kk4/react-snippets.git snippets
cd snippets

Linux:

cp x1kk4-snippets.code-snippets ~/.config/Code/User/snippets/

In VSCode: ctrl + shift + P -> Snippets: Configure User Snippets -> choose x1kk4-snippets.code-snippets

MacOS:

cp x1kk4-snippets.code-snippets ~/Library/Application\ Support/Code/User/snippets/

In VSCode: cmd + shift + P -> Snippets: Configure User Snippets -> choose x1kk4-snippets.code-snippets

General:

Trigger Output
log⇥ console
imp⇥ import
arr⇥ arrow func
efc⇥ export func component
edfc⇥ export default func component
edtfc⇥ ed typed func component
us⇥ useState
ue⇥ useEffect
t⇥ type
et⇥ export type
etf⇥ export type
<⇥ generic
cn⇥ className
cns⇥ className template string
nsc⇥ next server component
ncc⇥ next client component
ustyles⇥ useStyles (jss like styled system)

Examples:


log⇥

console.${1}(${2})

imp⇥

import ${1} from `${2}`

arr⇥

const ${1} = (${2}) => {${3}}

efc⇥

import { FC } from "react"

export const ${1}: FC = () => {
  return (
    <${2}>
      <p>${1}</p>
    </${2}>
  )
}

edfc⇥

import { FC } from "react"

const ${1}: FC = () => {
  return (
    <${2}>
      <p>${1}</p>
    </${2}>
  )
}

export default ${1}

edtfc⇥

import { FC } from "react"

interface ${1}Props {${3}}

const ${1}: FC<${1}Props> = ({${4}}) => {
  return (
    <${2}>
      <p>${1}</p>
    </${2}>
  )
}

export default ${1}

us⇥

const [${1}, set${1}] = useState<${2}>(${3})

ue⇥

useEffect(() => {
  ${2}
}, [${3}])

t⇥

type ${1} = {${2}}

et⇥

export type ${1} = {${2}}

etf⇥

export type {${2}} from '${1}'

<⇥

<${1}>

cn⇥

className={${1}}

cns⇥

className={`${${1}}`}

nsc⇥

const ${1} = async () => {
  return (
    <${2}>,
	  <p>${1}</p>
	</${2}>
  ),
},

export default ${1}

ncc⇥

'use client'

import { FC } from "react"

const ${1}: FC = () => {
  return (
    <${2}>
      <p>${1}</p>
    </${2}>
  )
}

export default ${1}

ustyles⇥

const useStyles = create${1}Styles(() => ({${2}}))

sn1pp3ts's People

Contributors

x1kk4 avatar

Stargazers

Alexey Kutsenko avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.