Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 504 Bytes

context.md

File metadata and controls

12 lines (8 loc) · 504 Bytes

context

when to use context

  1. typical data is passed top-down via props, but such usage can be cumbersome
  2. If you only want to avoid passing some props through many levels, component composition is often a simpler solution than context.

reference

react doc use context use context in typescript