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

async dispatch handler helper #3351

Closed
ronag opened this issue Jun 20, 2024 · 0 comments
Closed

async dispatch handler helper #3351

ronag opened this issue Jun 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ronag
Copy link
Member

ronag commented Jun 20, 2024

Would be nice to have a helper that makes it possible to write async dispatch without implementing the whole handler API.

export const myAsyncInterceptor = dispatch => asyncWrap(async (opts, handler) => {
  dispatch(await resolveOpts(opts), handler)
}))

Refs: #3350

@ronag ronag added the enhancement New feature or request label Jun 20, 2024
@ronag ronag closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant