Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
451 B
3
Indexable
Never

npx create-react-app app-name



// class based component


import React from "react";




class Student extends React.Component{

render(){
    return <div className="box">
        <h1>class component</h1>
    </div>
}

}

export default Student;

// function based component


function Student2(){
    return <div className="box">
        <h1>functional component</h1>
    </div>
};


export default Student2;