frintjs/frint

Possible race condition issue in `streamProps`

開放

#382 建立於 2017年11月28日

 (0 則留言) (2 個反應) (0 位負責人)JavaScript (37 個分叉)batch import
buggood first issuehelp wanted

倉庫指標

星標
 (746 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南