November 2018
Beginner
502 pages
10h 22m
English
Let's refactor our Confirm component to be a function component, in order to learn how to implement these:
const Confirm: React.SFC<IProps> = (props) => {...}
We define a function component using an arrow function, passing the props type in as a generic parameter.
We use stateless functional component (SFC) React.SFC to represent these type of components.
Our component is now throwing several compilation errors. We'll resolve these in the next steps.
Read now
Unlock full access