Skip to content

Commit

Permalink
docs: mention passing the .tsx file to createPage (#23329)
Browse files Browse the repository at this point in the history
* docs: mention passing the .tsx file to createPage

* Add as note passing the .tsx filename directly

Co-Authored-By: Obinna Ekwuno  <obinnacodes@gmail.com>

* chore: format

Co-authored-by: Obinna Ekwuno  <obinnacodes@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
3 people authored Apr 23, 2020
1 parent 73eb53b commit e8b026d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/gatsby-plugin-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module.exports = {
}
```

> When [creating pages programmatically](/docs/programmatically-create-pages-from-data/#creating-pages), you can pass the `.tsx` filename directly as the `component` for [`createPage`](/docs/actions/#createPage).
_**Please note**: If packages don't ship with TypeScript definitions you'll need to manually install those type definitions, e.g. for React. A typical Gatsby project would need: `npm install --save-dev @types/react @types/react-dom @types/node`_

## Options
Expand Down

0 comments on commit e8b026d

Please sign in to comment.