Skip to content

Commit 4625eaa

Browse files
authored
Update ADVANCED.md
1 parent 9c3df6c commit 4625eaa

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ADVANCED.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ The `@types` typings export both "public" types meant for your use as well as "p
680680

681681
Most Commonly Used Interfaces and Types
682682

683-
- `ReactNode` - anything that is renderable *inside* of JSX, this is NOT the same as what can be returned from a component!
683+
- `ReactNode` - anything that is renderable *inside* of JSX, this is NOT the same as what can be rendered by a component!
684684
- `Component` - base class of all class-based components
685685
- `PureComponent` - base class for all class-based optimized components
686686
- `FC`, `FunctionComponent` - a complete interface for function components, often used to type external components instead of typing your own
@@ -702,8 +702,7 @@ Not Commonly Used but Good to know
702702
- `ComponentPropsWithoutRef` - props of a component without its `ref` prop
703703
- all methods: `createElement`, `cloneElement`, ... are all public and reflect the React runtime API
704704

705-
706-
A special note that I discourage the use of most `...Element` types because of how black-boxy `JSX.Element` is. You should almost always assume that anything produced by `React.createElement` is the base type `React.ReactElement`.
705+
[@Ferdaber's note](https://github.com/sw-yx/react-typescript-cheatsheet/pull/69): I discourage the use of most `...Element` types because of how black-boxy `JSX.Element` is. You should almost always assume that anything produced by `React.createElement` is the base type `React.ReactElement`.
707706

708707
**Namespace: JSX**
709708

@@ -713,7 +712,7 @@ A special note that I discourage the use of most `...Element` types because of h
713712

714713
**Don't use/Internal/Deprecated**
715714

716-
Anything not listed above are considered internal types and not public.
715+
Anything not listed above is considered an internal type and not public. If you're not sure you can check out the source of `@types/react`. The types are annotated accordingly.
717716

718717
- `SFCElement`
719718
- `SFC`

0 commit comments

Comments
 (0)