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

[feature/redux] Add support for helpers in redux-thunk actions #650

Merged
merged 1 commit into from
May 17, 2016

Conversation

langpavel
Copy link
Collaborator

_Work in Progress_

Support for isomorphic fetch and graphqlRequest
helpers in redux-thunk action creators.

Extracted (and refactored) from my private work for @bravo-kernel. Not tested in this form.

Proposed usage:

// src/actions/auth/logout.js
import {
  LOGOUT,
} from '../../constants';

const query = `
query {
  logout(logout: true)
}`;

export function logout() {
  return async (dispatch, _, { graphqlRequest }) => {
    await graphqlRequest(query);
    dispatch({ type: LOGOUT });
    return true;
  };
}

Support for isomorphic `fetch` and `graphqlRequest`
helpers in redux-thunk action creators
@koistya koistya merged commit 2ea534e into kriasoft:feature/redux May 17, 2016
@langpavel
Copy link
Collaborator Author

Thanks! :-)

koistya pushed a commit that referenced this pull request Jul 10, 2016
* Add support for helpers in redux-thunk actions (#650)

Support for isomorphic `fetch` and `graphqlRequest`
helpers in redux-thunk action creators

* [feature/redux] Fix: Redux helpers client configuration (#663)

* Update npm modules; tweak Stylelint settings

* Change db string length (#691)

* Update history module to v3 (#692)

- Update `history` dependency to v3.0.0 ([changelog](https://github.com/ReactJSTraining/history/blob/master/CHANGES.md))
- Add `windowScrollX` and `windowScrollY` helpers to `core/DOMUtils`
- Rename `match()` to `UniversalRouter.resolve()`
- Fix scroll issues ([see article](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration))

* fix(Isomorphic Style Loader): Add support to load multiple styles (#678)

* fix(Isomorphic Style Loader): Add support to load multiple styles

* fix(Isomorphic Style Loader): Add remove feature back

* Adds testing section (#687)

Integrates comments by @langpavel

* Fix npm warnings about graphql dependencies (#693)

fixes #661

* Fix OccurrenceOrderPlugin spelling (#683)

* fixed typo in passport.js (#696)

* Docs: use more expressive language (#701)

* Add eslint global-require exception (#703)

Add eslint global-require exception, based in 'src/server.js' file.

The 'feature/react-intl' branch also has this problem.

* Update stylelint-config-standard (#707)

* Update stylelint-config-standard

When I run 'npm run lint', this warning show up:

Deprecation Warning: 'number-zero-length-no-unit' has been deprecated, and will be removed in '7.0'. Use 'length-zero-no-unit' instead. See: http://stylelint.io/user-guide/rules/length-zero-no-unit/

update package to remove it.

* Update stylelint

to use length-zero-no-unit instead number-zero-length-no-unit.

* Fix spelling of "vice versa" (#710)

* Remove jade dependency

* Update react-style-guide.md (#718)

replace ../Nav with ../Navigation

* Update CHANGELOG.md
@bjackson
Copy link

How do I use these helpers?

@langpavel
Copy link
Collaborator Author

@bjackson See graphqlRequest helper on top of this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants