Skip to content

🗑️ 4.2.2 - Remove assert in Spices

Latest
Compare
Choose a tag to compare
@simonbs simonbs released this 21 May 08:13
a807bc6

Setting up an observer in the initializer of a nested SpiceStore would trigger the assert before the parent–child relationship is wired up and developers would work around this by calling prepareIfNeeded() too early, which resulted in an incorrect key path for the child spice.

Removing the assertion makes this pattern valid. The nested store will be prepared automatically when its parent is ready.