Skip to content

Instantly share code, notes, and snippets.

@BrianLitwin
Last active January 30, 2019 15:18
Show Gist options
  • Save BrianLitwin/c8d1b1be7a0ab183aa2d6bb437f31880 to your computer and use it in GitHub Desktop.
Save BrianLitwin/c8d1b1be7a0ab183aa2d6bb437f31880 to your computer and use it in GitHub Desktop.
/*
FilterableProductTable
SearchBar
ProductTable
ProductCategoryRow
ProductRow
*/
const PRODUCTS = [
{category: 'Sporting Goods', price: '$49.99', stocked: true, name: 'Football'},
{category: 'Sporting Goods', price: '$9.99', stocked: true, name: 'Baseball'},
{category: 'Sporting Goods', price: '$29.99', stocked: false, name: 'Basketball'},
{category: 'Electronics', price: '$99.99', stocked: true, name: 'iPod Touch'},
{category: 'Electronics', price: '$399.99', stocked: false, name: 'iPhone 5'},
{category: 'Electronics', price: '$199.99', stocked: true, name: 'Nexus 7'}
];
ReactDOM.render(
<FilterableProductTable products={PRODUCTS} />,
document.getElementById('container')
);
/*
Break the UI into a Component Hierarchy
Build a static version
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment