Open furdzik opened 3 years ago
[PROPOSITION 1]
const someAction = (something) => ({
type: actionTypes.SOME_ACTION,
payload: {
something
}
})
[PROPOSITION 2]
const someAction = (something) => ({
type: actionTypes.SOME_ACTION,
payload: something
})
[PROPOSITION 3]
const someAction = (payload) => ({
type: actionTypes.SOME_ACTION,
payload
})
const fetchListingSuccess = (listing, canLoadMoreEvents, currentFilters, initialFilterValues) => ({
type: actionTypes.FETCH_LISTING_SUCCESS,
listing,
canLoadMoreEvents,
currentFilters,
initialFilterValues
});
https://redux.js.org/style-guide/style-guide#write-actions-using-the-flux-standard-action-convention