diff --git a/README.md b/README.md index a26fd830..58646d37 100644 --- a/README.md +++ b/README.md @@ -1126,6 +1126,8 @@ type AppProps = { onClick(event: React.MouseEvent): void; /** an optional prop (VERY COMMON!) */ optional?: OptionalType; + /** when passing down the state setter function returned by `useState` to a child component. `number` is an example, swap out with whatever the type of your state */ + setState: React.Dispatch>; }; ``` diff --git a/docs/basic/getting-started/basic-type-examples.md b/docs/basic/getting-started/basic-type-examples.md index f32f5e87..64560b2f 100644 --- a/docs/basic/getting-started/basic-type-examples.md +++ b/docs/basic/getting-started/basic-type-examples.md @@ -48,6 +48,8 @@ type AppProps = { onClick(event: React.MouseEvent): void; /** an optional prop (VERY COMMON!) */ optional?: OptionalType; + /** when passing down the state setter function returned by `useState` to a child component. `number` is an example, swap out with whatever the type of your state */ + setState: React.Dispatch>; }; ```