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

refactor connectThis #17

Closed
yi-bai opened this issue Jun 3, 2017 · 3 comments
Closed

refactor connectThis #17

yi-bai opened this issue Jun 3, 2017 · 3 comments

Comments

@yi-bai
Copy link
Owner

yi-bai commented Jun 3, 2017

point: state.this and dispatch.this is not enough.
add a rewpa-thunk to getState via getState.this

@yi-bai
Copy link
Owner Author

yi-bai commented Jun 3, 2017

see #19

@yi-bai yi-bai closed this as completed Jun 3, 2017
@yi-bai yi-bai reopened this Jun 4, 2017
@yi-bai
Copy link
Owner Author

yi-bai commented Jun 4, 2017

current solution not work with redux-thunk

@yi-bai
Copy link
Owner Author

yi-bai commented Jun 4, 2017

  1. mapStateToProps(state, { path }) -> use rewpa.get(state, path) to get state of this scope.
  2. mapDispatchToProps(dispatch, { path }), dispatch({ path, type:, payload: }) to dispatch to this scope.
  3. write a middleware to change {path, type, payload} into {type, payload}

@yi-bai yi-bai closed this as completed Jun 4, 2017
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

No branches or pull requests

1 participant