diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-13 23:25:21 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-20 13:30:31 -0500 |
| commit | 6d4d705c51a3d39e4de22a3320cfa61ef63a0066 (patch) | |
| tree | 153f393d4443e52e197176b33039a639976b7bbc /src/hocs/with_list | |
| parent | 339373b495f5f30833268c01d1fe958e2ee99a7f (diff) | |
Rename some options and add comments to HOCs
Diffstat (limited to 'src/hocs/with_list')
| -rw-r--r-- | src/hocs/with_list/with_list.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hocs/with_list/with_list.js b/src/hocs/with_list/with_list.js index c31cdcb1..e5770cee 100644 --- a/src/hocs/with_list/with_list.js +++ b/src/hocs/with_list/with_list.js @@ -4,7 +4,10 @@ import map from 'lodash/map' const defaultEntryPropsGetter = entry => ({ entry }) const defaultKeyGetter = entry => entry.id -const withList = ({ getEntryProps = defaultEntryPropsGetter, getKey = defaultKeyGetter }) => (ItemComponent) => ( +const withList = ({ + getEntryProps = defaultEntryPropsGetter, // function to accept entry and index values and return props to be passed into the item component + getKey = defaultKeyGetter // funciton to accept entry and index values and return key prop value +}) => (ItemComponent) => ( Vue.component('withList', { render (createElement) { return ( |
