Instantly share code, notes, and snippets.

Embed
What would you like to do?
REA Flux to Redux "The Realisation" - http://rea.tech/singletons-suck-aka-flux-to-redux/

It's not the cookies!! \o/

TL;DR: The flux stores are not being initialised on every request.

First request to the server:

request cookies:  {}
params:  {}
toggles:  {}

Second request (turning on a toggle via the query parameter):

request cookies:  { }
params:  { featureA: 'true' }
toggles:  { featureA: true }

A new client comes along:

request cookies:  {}
params:  {}
toggles:  { featureA: true }

THE TOGGLE IS STILL SET!

The request with the toggle sets the state in the FeatureToggleStore... which is being shared between each request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment