Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Update README.md #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ git commit -m "Initial commit."

> Note: if you've cloned this repository, you won't have to run the above at all.

# Overriding defaults
# Overriding Defaults

The TSLint configuration that react-scripts-ts sets us up with is a bit overzealous.
Let's fix that up.
Expand Down Expand Up @@ -214,7 +214,7 @@ Classes are useful [when our component instances have some state or need to hand
But we don't really need to think about state in this specific example - in fact, we specified it as `object` in `React.Component<Props, object>`, so writing an SFC makes more sense here, but it's important to know how to write a class component.

Notice that the class extends `React.Component<Props, object>`.
The TypeScript-specific bit here are the type arguments we're passing to `React.Component`: `Props` and `object`.
The TypeScript-specific bit here is the type arguments we're passing to `React.Component`: `Props` and `object`.
Here, `Props` is the type of our class's `this.props`, and `object` is the type of `this.state`.
We'll return to component state in a bit.

Expand Down