SHARE
TWEET

Untitled

a guest Mar 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. What situations would be good to use context?
  2. It's used to share data that can be considered “global” for a tree of React components,
  3. such as the current authenticated user, theme, or preferred language.
  4. They can be used to avoid passing props through intermediate elements.
  5.  
  6. If you need to pass a prop down 1 or 2 levels, is context necessary?
  7. No it is not always neccessary.
  8.  
  9. Can you pass a component instance as a prop to avoid the need for context?
  10. Yes you can by using component composition.
  11.  
  12. Can you write your own components that accept render props?
  13. Yes.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top