Skip to content

Instantly share code, notes, and snippets.

@rjcorwin
Last active October 31, 2018 04:15
Show Gist options
  • Save rjcorwin/a221f4725aecc7e0e8d5b9a165715038 to your computer and use it in GitHub Desktop.
Save rjcorwin/a221f4725aecc7e0e8d5b9a165715038 to your computer and use it in GitHub Desktop.
Idea of how a conceptual redux-dat would work...
import { createStore } from 'redux-dat'
import reducer from './reducer.js'
const myActions = new DatArchive()
const store = createStore(myActions, reducer)
store.addPeer('...')
@rjcorwin
Copy link
Author

It would perhaps facilitate peer-to-peer lockstep consensus strategy described as being used in early Real Time Strategy games. However, I could see how the store could do some optimistic evaluating of state given a local action but this is still thorny if the result of state is nondeterministic.

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