What would happen if we did validation in builder methods instead of instantiate
#2206
Replies: 1 comment
-
I have various reasons for my stance:
There'll definitely be a cost to this now, but my thinking is that we're mostly just shifting an existing cost around, and that the cost itself is pretty small. For the benefit of anyone else reading: I haven't quite figured out why, but the current way we do these checks is perhaps leaking the snapshot reaction we set up on instantiation. By shifting this check sooner, you actually avoid paying a bunch of cost associated with failed instantiation (because this fails quite late in the instantiation process). |
Beta Was this translation helpful? Give feedback.
-
In, #2204 @thegedge said:
I think this is really interesting. I'd love to explore it a little more.
My first concern is for people chaining
views
andactions
calls for TypeScript reasons. Would they pay a performance cost for that pattern where they weren't before?Beta Was this translation helpful? Give feedback.
All reactions