Skip to content

Instantly share code, notes, and snippets.

@trnktms
Last active June 20, 2022 11:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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