diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 17:48:28 +0100 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2017-01-22 17:48:31 +0100 |
commit | 9550f36b0d708b776927e3a404422cc5e1bf4600 (patch) | |
tree | 79b66c3e0e01be45f5b808aeec959b216a25add3 /frontend/src | |
parent | Fix subscription path for prepared cards and turns (diff) | |
download | seven-wonders-9550f36b0d708b776927e3a404422cc5e1bf4600.tar.gz seven-wonders-9550f36b0d708b776927e3a404422cc5e1bf4600.tar.bz2 seven-wonders-9550f36b0d708b776927e3a404422cc5e1bf4600.zip |
Temp fix saga ran on location change #2
Diffstat (limited to 'frontend/src')
-rw-r--r-- | frontend/src/routes.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 25e849de..a707c435 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -1,12 +1,15 @@ +import { spawn } from 'redux-saga/effects' import usernameChoiceSaga from './sagas/usernameChoice' import gameBrowserSaga from './sagas/gameBrowser' +// TODO: Remove spawn saga when redux-saga-router has cancelable saga on route change export const makeSagaRoutes = wsConnection => ({ *'/'() { - yield usernameChoiceSaga(wsConnection) + // FIXME: spawn is a memory whore because the saga lives forever + yield spawn(usernameChoiceSaga, wsConnection) }, *'/games'() { - yield gameBrowserSaga(wsConnection) + yield spawn(gameBrowserSaga, wsConnection) } }) |