November 2018
Beginner
502 pages
10h 22m
English
Let's look at App.tsx, which has been created for us. This is an example of a class component. We're going to create our own class component now. Follow these steps:
import * as React from "react";class Confirm extends React.Component { }export default Confirm;
We learned all about classes in Chapter 1, TypeScript Basics. Here we are creating a class that extends the standard Component class from React. Note that we've imported React at the top of our file, and also that we are exporting our class component using a default export at the bottom of our file.
Read now
Unlock full access