Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- What situations would be good to use context?
- For certain types of props (e.g. locale preference, UI theme) that are required by many components within an application.
- If you need to pass a prop down 1 or 2 levels, is context necessary?
- It's not completely necessary and composition might be abtter solution. Context is designed to be used by many components.
- Can you pass a component instance as a prop to avoid the need for context?
- Yes you can.
- Can you write your own components that accept render props?
- Yes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement