Skip to content

Support classes #4

Description

@peterholak

Hi, great library, I love the idea of not having to use any special structures to achieve immutable updates.

Would it be possible to also support ES6 classes when updating the object? Right now, if I have

class Hello {
    constructor(world) { this.world = world }
    say() { console.log(this.world) }
}
const a = new Hello("World")

and I update a, the resulting object no longer has the same __proto__, so I can't call say on it, etc.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions