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

Reactive Protocol Membrane #71

Closed
davidturissini opened this issue Feb 6, 2018 · 1 comment
Closed

Reactive Protocol Membrane #71

davidturissini opened this issue Feb 6, 2018 · 1 comment
Assignees

Comments

@davidturissini
Copy link
Contributor

davidturissini commented Feb 6, 2018

Description

Iterate on locker-membrane for reactivity.

  • Weak Map of Reactive State objects (tuple of full reactive proxy, and read only)
  • Reactive State API:
    • notifcationOfPropertyMemberChange(o, key)
    • notificationOfPropertyMemberAccess(o, key)
  • rename package to observable-membrane
  • Distortion layer for dry objects only

New membrane APIs (hooks for touching/updating/mutating)

  • getReadOnly
  • getReactiveProxy

subscribeToMutations
notifyMutation

API:

const membrane = new ReactiveMembrane(() => {});
const foo = {
    bar: 'baz',
}
membrane.getReadOnly(foo); // get read only reactive membrane
membrane.getReactiveProxy(foo); // get read/write reactive membrane
@pmdartus
Copy link
Member

pmdartus commented Feb 8, 2018

What you think about using a consistent naming for the 2 APIs? For example membrane.getProxy and membrane.getReadOnlyProxy

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

2 participants