Skip to content

Commit e30c87c

Browse files
committed
Merge pull request #98 from akameco/fix/react-element-type
docs(ADVANCED.md): ReactType -> ElementType
2 parents ad414c5 + 0173f5d commit e30c87c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ADVANCED.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,10 @@ export interface Props {
284284

285285
## `as` props (passing a component to be rendered)
286286

287-
`ReactType` is pretty useful to cover most types that can be passed to createElement e.g.
287+
`ElementType` is pretty useful to cover most types that can be passed to createElement e.g.
288288

289289
```tsx
290-
function PassThrough(props: { as: ReactType<any> }) {
290+
function PassThrough(props: { as: ElementType<any> }) {
291291
const { as: Component } = props;
292292

293293
return <Component />;
@@ -930,7 +930,7 @@ Most Commonly Used Interfaces and Types
930930
Not Commonly Used but Good to know
931931
932932
- `Ref` - used to type `innerRef`
933-
- `ReactType` - used for higher order components or operations on components
933+
- `ElementType` - used for higher order components or operations on components
934934
- `ComponentType` - used for higher order components where you don't specifically deal with the intrinsic components
935935
- `ReactPortal` - used if you specifically need to type a prop as a portal, otherwise it is part of `ReactNode`
936936
- `ComponentClass` - a complete interface for the produced constructor function of a class declaration that extends `Component`, often used to type external components instead of typing your own
@@ -957,6 +957,7 @@ Anything not listed above is considered an internal type and not public. If you'
957957
- `ComponentState`
958958
- `LegacyRef`
959959
- `StatelessComponent`
960+
- `ReactType`
960961
961962
## `@types/react-dom`
962963

0 commit comments

Comments
 (0)