React.js

21.09.04 컴포넌트 생성 단축키

슈팅스타제제 2021. 9. 4. 17:36

함수형 컴포넌트

✔rafce

react arrow functional export component

import React from 'react'

const Blockchain = () => {
    return (
        <div>
            
        </div>
    )
}

export default Blockchain

✔rfc

react functional component

import React from 'react'

export default function Blockchain() {
    return (
        <div>
            
        </div>
    )
}

✔rfce 

react functional export component

import React from 'react'

function Blockchain() {
    return (
        <div>
            
        </div>
    )
}

export default Blockchain

 

클래스형 컴포넌트 

✔rcc

react class component

import React, { Component } from 'react'

export default class Blockchain extends Component {
    render() {
        return (
            <div>
                
            </div>
        )
    }
}

✔rce

react class export component

import React, { Component } from 'react'

export class Blockchain extends Component {
    render() {
        return (
            <div>
                
            </div>
        )
    }
}

export default Blockchain