I found it a bit counterintuitive to be forced to add a "placeholder" component only to have it "replaced immediately", so I did a helper function to help with that.
It might not be worth the added cognitive load of an additional function hiding "complexity", but this pattern has helped me with bigger components where in practice I had to declare it above the spawn, then clone it, or implement default.
I found it a bit counterintuitive to be forced to add a "placeholder" component only to have it "replaced immediately", so I did a helper function to help with that.
It might not be worth the added cognitive load of an additional function hiding "complexity", but this pattern has helped me with bigger components where in practice I had to declare it above the spawn, then clone it, or implement default.