react-class-components Flashcards
1
Q
How do you create “class” component in React?
A
class ClassName extends React.Component
2
Q
How do you access props in a class component?
A
this.props.nameofwhatyouwanttoaccess
Learning Fuze > react-class-components > Flashcards
How do you create “class” component in React?
class ClassName extends React.Component
How do you access props in a class component?
this.props.nameofwhatyouwanttoaccess