Skip to content

Instantly share code, notes, and snippets.

@dcramer
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcramer/04d793e2ae699b3791aa to your computer and use it in GitHub Desktop.
Save dcramer/04d793e2ae699b3791aa to your computer and use it in GitHub Desktop.

Item List => Item => ItemStatusSelector

  • Need to maintain certain state in ItemStatusSelector (specifically have we "saved" the change, this is to avoid passing useless properties all over the place like itemStatusIsSaving)
  • Currenlty Item List controls item via prop, which controls item status via prop. This means we pass an onStatusChange all the way back to Item List.
  • [Re]flux seems to resolve this by using some store/action combo, but unclear if "Item" is in an "item list" store or if each item should be its own store, or how "change item status" should actually flow
@johnthedebs
Copy link

Not sure I totally understand, but I think this does what you're asking: https://gist.github.com/johnthedebs/a5d15d77efe8dc4c2cb0

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