- What special property does React give us to access a components children?
A property called children
- How many components can share state with React context?
As many components as we like that are under the provider component in the component hierarchy
- When consuming the React context, what pattern does it use to allow us to render our content with the context?
The render props pattern
- How many render props can we have in a component?
As many as we like
- How many children props do we have in a component?
1
- We only used withLoader on the product page. We have the following function in ProductData.ts to get all the products:
export const getProducts = async (): Promise<IProduct[]> => {
await wait(1000);
return products;
};
Can you use this to implement a loader spinner on the products page by consuming the withLoader HOC.
First we...