Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Do not merge!) Discussion: A userland replacement for replaceReducer #625

Closed
wants to merge 1 commit into from

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Aug 25, 2015

Building on #624, here is a proposed replacement for replaceReducer API that can be implemented in userland. Note how we no longer require <Root> component. Refs #350.

// Note: this is meant to be provided in a separate package.
// I'm only including it here for discussion.

const SWITCH_REDUCER = { type: 'redux-switch/SWITCH_REDUCER' };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you've left off the @@ at the beginning?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the @@ may be because this is intended to be implemented in userland.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I interpreted "userland" to mean another npm package, a la redux-thunk et al.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, forgot about it. Yeah, it's probably better to leave it in because I can't imagine a siutation where you'd want to handle it.

@quicksnap
Copy link
Contributor

Are there any drawbacks to this approach that come to mind? I really like this!

@acdlite
Copy link
Collaborator

acdlite commented Aug 25, 2015

@quicksnap Only downside I can think of is there's slightly more set-up for the developer

@gaearon
Copy link
Contributor Author

gaearon commented Aug 31, 2015

Let's take it slow.
#668 is the first step. We'll revisit whether we really want to do this after we get some feedback on it.

@gaearon gaearon closed this Aug 31, 2015
@gaearon gaearon deleted the remove-replace-reducer-hot branch August 31, 2015 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants