frintjs/frint

Possible race condition issue in `streamProps`

Open

#382 aberto em 28 de nov. de 2017

Ver no GitHub
 (0 comments) (2 reactions) (0 assignees)JavaScript (37 forks)batch import
buggood first issuehelp wanted

Métricas do repositório

Stars
 (746 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Current situation

We ship streamProps helper function from frint-component-utils package, which allows combining values from various sources and then generate a single observable of props.

It uses concatMap operator from RxJS internally.

Possible bug

There is a possibility that with concatMap, we will have some race condition issue.

It is advised to use switchMap instead.

What to do

  • Write unit tests proving there is a race condition issue with streamProps
  • If there is, replace concatMap usage with switchMap without breaking the API

Guia do colaborador