This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FoodList = ({ loaded, data }) => { | |
if (!loaded) { | |
return <Spinner /> | |
} | |
const { foodItemsWithFacts } = data; | |
return ( | |
<ul className="food-list"> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createSelector, createStructuredSelector } = require('reselect') | |
const identity = x => x | |
const createAsyncSelector = ( | |
asyncSelectors = {}, | |
syncSelectors = {}, | |
compute = identity | |
) => { | |
// Let’s do a little argument dance to optionally support the uniform | |
// handling of synchronous selectors (selectors on data not conforming |
OlderNewer