Tip | VS Code-React Snippet

블로그 이사 완료·2022년 12월 5일
0
post-thumbnail

📍 ES7 React / Redux / GraphQL / React-Native snippets

ES7 React / Redux / GraphQL / React-Native snippets extension
설치 후 사용 할 수 있는 명령어 리스트를 정리해보려 한다.

함수형 Component 생성
코드가 작성 된 JavaScript 파일 이름 기반으로 Component가 생성된다.

/* rfce + Enter */
import React from 'react'
function app() {
  return (
    <div>app</div>
  )
}
export default app

클래스형 Component 생성

/* rcc + Enter */
import React, { Component } from 'react'
export default class app extends Component {
  render() {
    return (
      <div>app</div>
    )
  }
}

기명 함수 생성

/* nfn + Enter */
const name = (params) => {};

리액트 import

/* imr + Enter */
import React from 'react'

리액트 + Component import

/* imrc + Enter */
import React, { Component } from 'react'

기본 모듈 import

/* imp + Enter */
import moduleName from 'module';
profile
https://kyledev.tistory.com/

0개의 댓글