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

Update redux-saga usage docs #175

Open
Kamahl19 opened this issue Jul 24, 2019 · 5 comments
Open

Update redux-saga usage docs #175

Kamahl19 opened this issue Jul 24, 2019 · 5 comments

Comments

@Kamahl19
Copy link

Redux-saga solved (microsoft/TypeScript#30790) the long-opened issue (microsoft/TypeScript#2983) mentioned in docs https://github.com/piotrwitek/typesafe-actions#with-redux-saga-sagas , so I suppose they can be updated with better example

@Kamahl19 Kamahl19 changed the title Update redux-saga docs Update redux-saga usage docs Jul 24, 2019
@piotrwitek
Copy link
Owner

Hey @Kamahl19, thanks for the heads up.

Are you able to provide an updated example?

@pybuche
Copy link
Contributor

pybuche commented Oct 24, 2019

I'm also interested in this. Actually the example with saga in the README doesn't work :/

@Kamahl19
Copy link
Author

@pybuche what do you mean doesnt work

@pybuche
Copy link
Contributor

pybuche commented Oct 25, 2019

There is a typo in the code example, but I realized it only a few hours ago :)

function* addTodoSaga(action: ReturnType<typeof fetchTodosAsync.request>): Generator {
  try { // missing this line
    const response: Todo[] = yield call(todosApi.getAll, action.payload);

    yield put(fetchTodosAsync.success(response));
  } catch (err) {
    yield put(fetchTodosAsync.failure(err));
  }
}

@piotrwitek
Copy link
Owner

@pybuche created a bug for it #184, up for grabs

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

No branches or pull requests

3 participants