CodeForPhilly / CodeForPhilly/stately

Queue xhr requests until auth completed

オープン
#58 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
22
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

説明

In [index.js](https://github.com/CodeForPhilly/stately/blob/master/client/src/index.js) we're currently breaking the choo paradigm by firing an xhr request out in the wild, before even initialising the app. This is necessary because all the subsequent requests depend on the session that should be set by that initial request.

I was thinking that one of the only other ways to accommodate this would be to "queue" any subsequent xhr requests until the initial auth request is completed (since subsequent requests happen asynchronously). I thought it was crazy, but @yoshuawuyts just thought of the same thing, so maybe it's not so nuts. We'd just want to ensure that queuing is explicit so there's no magic, ie.

``` javascript
xhr({uri: '...'}, waitForAuth=True)
```

(but, ya know, in javascript not python)

This is definitely "backlog"

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。