Skip to content

Commit

Permalink
Fix inline code not showing (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
arseni-iulian committed Dec 2, 2020
1 parent c9efb82 commit 78ee70e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced/patterns_by_usecase.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ Parent.propTypes = {

The thing you cannot do is **specify which components** the children are, e.g. If you want to express the fact that "React Router `<Routes>` can only have `<Route>` as children, nothing else is allowed" in TypeScript.

This is because when you write a JSX expression (const foo = <MyComponent foo='foo' />), the resultant type is blackboxed into a generic JSX.Element type. (_[thanks @ferdaber](https://github.com/typescript-cheatsheets/react/issues/271)_)
This is because when you write a JSX expression (`const foo = <MyComponent foo='foo' />`), the resultant type is blackboxed into a generic JSX.Element type. (_[thanks @ferdaber](https://github.com/typescript-cheatsheets/react/issues/271)_)

## Type Narrowing based on Props

Expand Down

0 comments on commit 78ee70e

Please sign in to comment.