Skip to content

Instantly share code, notes, and snippets.

@trnktms
Last active Jun 20, 2022
Embed
What would you like to do?
import { AppContext } from '@/pages/[[...path]]';
import { Box } from '@mui/material';
import { useContext } from 'react';
export const Products = (): JSX.Element => {
const { products: contextProducts } = useContext(AppContext);
return (<Box>{contextProducts?.map(p => p.Name).concat()}</Box>);
};
export default Products;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment