cereallarceny / cra-ssr

[DEPRECATED] Server-side rendering with create-react-app, React Router v4, Helmet, Redux, and Thunk
484 stars 118 forks source link

bindActionCreator cleanup? #25

Closed voshawn closed 6 years ago

voshawn commented 6 years ago

Hi There, First off, thanks so much for putting this together. It's super helpful!

Is there a reason we are using bindActionCreator? For example:

const mapDispatchToProps = dispatch =>
    bindActionCreators({ getCurrentProfile, removeCurrentProfile }, dispatch);

I believe could be rewritten as

const mapDispatchToProps = {
    getCurrentProfile, 
    removeCurrentProfile};

I can submit a PR to change all of the occurrences, but I wanted to make sure I wasn't missing anything related to SSR.

Thanks, Shawn

cereallarceny commented 6 years ago

Personally I don't have a problem with how it's written currently. But if it's that important, go ahead and submit a proposal. Here's an article I found discussing various implementations: https://blog.benestudio.co/5-ways-to-connect-redux-actions-3f56af4009c8

voshawn commented 6 years ago

Thanks for sharing that link! This isn't super important to me either so let's just leave it as is.