Replies: 1 comment 1 reply
-
Thanks for the question. One caution is that this is all exploratory, not intending to set any sort of "best practice". The thing I've been exploring here is intentionally keeping a few things very distinct:
That idea I was going for allows a couple of things: I can create a Instead of doing work automatically, it supports doing ongoing work, as exposed by One way to call Once I have that simple I sort of view this
So if |
Beta Was this translation helpful? Give feedback.
-
In the
ComposeLifeApp
file in theui-app
module, there's use of aTemporalGameOfLifeStateMutator
which takesTemporalGameOfLifeState
and other arguments.Later, there's a call to
TemporalGameOfLifeStateMutator
'supdate
function which just callsTemporalGameOfLifeState
'sevolve
function in the various argument'swith
block.Is there any reason it's separated like this?
Could you call the
evolve
function from theTemporalGameOfLifeState
instead, passing in the arguments, or does this go against some best practice?I'm asking the question as when I create state holder objects, I usually just mutate from the same object and read from the same object.
Beta Was this translation helpful? Give feedback.
All reactions