Sigurd Spieckermann

Results 258 comments of Sigurd Spieckermann

Okay, I'll investigate a bit further.

You need to create the instance of `B` explicitly: ```ts const a = new A({ name: "foo", b: new B({ name: "bar" }) }) ```

The more I think about it, the more it feels like the idea of a sandbox in which actions can be performed contradicts the idea of computed properties and that's...

That's more or less how I'm doing it right now to work around the problem with a computed property. It just feels like a workaround.

By the way, the workaround using `autorun` results in a cycle: ```ts test("observables in sandbox are tracked (autorun)", () => { const sandboxContext = createContext() @model("R2") class R extends Model({...

Interestingly, this (computed property with sandbox) works with both `autorun` and `reaction`: ```ts test("observables in sandbox are tracked", () => { const sandboxContext = createContext() @model("R2") class R extends Model({...

Let me add a couple of thoughts. > - The relationship of errors (using a union type leads to disjunctive errors) should be retained in the error collection in order...

On second thought, providing the errors without `onChildAttachedTo` may be even simpler: ```ts onInit() { // set the error context: // (a) if the context does not exist or this...

I like the idea of making comprehensive runtime validation a feature of `draft`. With the current type-checking in place, the original state would strictly enforce the type constraints while the...