My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Which method are you using for map Redux dispatches to props?

Mark Rosenthalstein's photo
Mark Rosenthalstein
·Nov 12, 2016

Found this question somewhere on web and happens to be my question as well. Which method do you use and why?

function mapDispatchToProps(dispatch){
    return {
        onDeleteFlashMessage : bindActionCreators(deleteFlashMessage, dispatch),

        <!--  OR THIS -->

        onDeleteFlashMessage : (id) => {
            dispatch(deleteFlashMessage(id));
        }

    };
}