benlumley
Is there a way to avoid duplicate afterStateUpdated methods ?
I have code like:
Simplified example; but basically, one field depends on two others. You have to have the same duplicated afterStateUpdated callback on both fields.
It'd be a load nicer not to duplicate this and just have it attached to the total field. Is there a way to do this at all ? I've had a good dig but can't find anything.
(I realise I can extract the method to a closure/other method; but it'd still be nice not to attach it twice)
7 replies