Closed oyiptong closed 8 years ago
right now, the page is expecting data at the top level of the object:
switch (action.type) { case c.REQUEST_SUGGESTED_DIRECTORY: return updateState(prevState, { isSuggestedLoading: true }); case c.RECEIVE_SUGGESTED_DIRECTORY: return updateState(prevState, { isSuggestedLoading: false, suggested: action.suggested, directory: TileUtils.formatDirectoryTiles(action.directory) });
this suggests that the data looks like:
{type: "RECEIVE_SUGGESTED_DIRECTORY", suggested: ...}
How about we do:
{type: ... data: { suggested: ...}}
it's an almost no-cost abstraction and one can list the data attributes easily
Agreed :+1:
right now, the page is expecting data at the top level of the object:
this suggests that the data looks like:
How about we do:
it's an almost no-cost abstraction and one can list the data attributes easily