Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. What situations would be good to use context?
  2.  
  3. For certain types of props (e.g. locale preference, UI theme) that are required by many components within an application.
  4.  
  5. If you need to pass a prop down 1 or 2 levels, is context necessary?
  6.  
  7. It's not completely necessary and composition might be abtter solution. Context is designed to be used by many components.
  8.  
  9. Can you pass a component instance as a prop to avoid the need for context?
  10.  
  11. Yes you can.
  12.  
  13. Can you write your own components that accept render props?
  14.  
  15. Yes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement