Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use js-atom internally for state #35

Open
glenjamin opened this issue Apr 3, 2016 · 0 comments
Open

Use js-atom internally for state #35

glenjamin opened this issue Apr 3, 2016 · 0 comments

Comments

@glenjamin
Copy link
Owner

And also remove & document that the react-style automerging of objects doesn't happen. This is so we can support any type of object here without messing it up.

Possibly worth providing another util on the devboard module to do a clean state update? devboard.update(state, newProperties) which would be equivalent to Object.assign({}, state, newProperties.

could possibly expand this on the card param

  • card.value - current value (with support for card.state as a back-compat fallback?)
  • card.update() - atom.swap
  • card.set() - atom.reset
  • card.atom - the atom itself
  • card.merge(obj | func) react-style shallow-merge update (with support for card.setState as a back-compact fallback?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant