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

The example in the README does not work #5

Open
0xR opened this issue Aug 14, 2016 · 2 comments
Open

The example in the README does not work #5

0xR opened this issue Aug 14, 2016 · 2 comments

Comments

@0xR
Copy link

0xR commented Aug 14, 2016

function initializeAuth () {
  return cookie('authToken')
    .step(setAuthToken)
}

Gives the error .step is not a function. This makes sense because step isn't even in the source code.

This is really confusing though. Probably I need something from redux-effects itself, but I don't know what.

@Tuch
Copy link

Tuch commented Aug 17, 2016

@0xR , i've found some examples here https://www.npmjs.com/package/redux-effects

@ashaffer
Copy link
Member

Ah sorry, that was a holdover from an old way of doing things. I've updated the documentation. The correct way now is:

import {bind} from 'redux-effects'
import {cookie} from 'redux-effects-cookie'
import {createAction} from 'redux-actions'

const setAuthToken = createAction('SET_AUTH_TOKEN')

function initializeAuth () {
  return bind(cookie('authToken'), setAuthToken)
}

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

3 participants