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

Upgrade to 4.0.0 #1

Closed
dbtek opened this issue Dec 14, 2016 · 4 comments
Closed

Upgrade to 4.0.0 #1

dbtek opened this issue Dec 14, 2016 · 4 comments

Comments

@dbtek
Copy link

dbtek commented Dec 14, 2016

Hi, thanks for providing this. It's very helpful.

I started to upgrade my app to choo 4. I thought older effects with state, data param ordering should work, but it did not.

effects: {
    attemptLogin: (state, data, send, done) => {
      send('auth:setPending', true, done)
      const cred = firebase.auth.EmailAuthProvider.credential(data.email, data.password)
      auth.signInWithCredential(cred)
        .then(res => {
          send('notify:info', { message: 'Successfully signed in' }, done)
          send('auth:setPending', false, done)
        })
        .catch(error => {
          send('notify:error', { message: error.message }, done)
          send('auth:setPending', false, done)
          send('auth:logout', done)
        })
    },
  ...
}

Calling this effect starts an infinite loop. It keeps running endlessly. What am I doing wrong?
Thanks in advance.

@dbtek
Copy link
Author

dbtek commented Dec 14, 2016

Ps. I also tried removing done param from repeating sends; and chaining sends in callback functions.

@fyrkant
Copy link
Owner

fyrkant commented Dec 19, 2016

Hi! I'll try to get to updating the app to v4 as soon as possible, just haven't had time to get into it yet.

@fyrkant
Copy link
Owner

fyrkant commented Jan 15, 2017

The app is now updated to choo v4!

@dbtek
Copy link
Author

dbtek commented Jan 19, 2017

Thanks @fyrkant.

@dbtek dbtek closed this as completed Jan 19, 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

2 participants