Skip to content

Commit e8b026d

Browse files
dandvEkwunogatsbybot
authored
docs: mention passing the .tsx file to createPage (#23329)
* docs: mention passing the .tsx file to createPage * Add as note passing the .tsx filename directly Co-Authored-By: Obinna Ekwuno <[email protected]> * chore: format Co-authored-by: Obinna Ekwuno <[email protected]> Co-authored-by: gatsbybot <[email protected]>
1 parent 73eb53b commit e8b026d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/gatsby-plugin-typescript/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ module.exports = {
2121
}
2222
```
2323

24+
> 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).
25+
2426
_**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`_
2527

2628
## Options

0 commit comments

Comments
 (0)