~/talk

React's Most Useful Types

Talkat React Day Berlin 2023 · on Tuesday, 2023-12-12· at 16:50· [typescript, react]

Live coding demonstrates concrete TypeScript helpers: shows that JSX nodes are react.JSX.Element but renderable values use react.ReactNode, explains why React.FC no longer implicitly includes children and now returns ReactNode, extracts native props via react.JSX.IntrinsicElements versus ComponentProps, builds an inputs registry that accepts function, class or intrinsic tags using React.ComponentType and ElementType, and resolves a React Select ref mismatch with react.elementRef — all examples compile and run in the live session.

AI-written summary · about

  1. 0:00Introduction to React types
  2. 2:53JSX element vs React node
  3. 5:19Functional component types
  4. 8:48Handling native HTML elements
  5. 12:14Component props helper
  6. 14:09Component type and classes
  7. 16:55Polymorphic element types
  8. 18:56Ref types and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.