You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-5Lines changed: 2 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,7 @@ class AppSpiceStore: SpiceStore {
76
76
tryawait Task.sleep(for: .seconds(1))
77
77
URLCache.shared.removeAllCachedResponses()
78
78
}
79
-
80
-
let featureFlags =FeatureFlagsSpiceStore()
79
+
@Spicevar featureFlags =FeatureFlagsSpiceStore()
81
80
}
82
81
83
82
classFeatureFlagsSpiceStore: SpiceStore {
@@ -294,7 +293,7 @@ Spice stores can be nested to create a hierarchical user interface.
294
293
295
294
```swift
296
295
finalclassAppSpiceStore: SpiceStore {
297
-
let featureFlags =FeatureFlagsSpiceStore()
296
+
@Spicevar featureFlags =FeatureFlagsSpiceStore()
298
297
}
299
298
300
299
finalclassFeatureFlagsSpiceStore: SpiceStore {
@@ -303,8 +302,6 @@ final class FeatureFlagsSpiceStore: SpiceStore {
303
302
}
304
303
```
305
304
306
-
Note that nested spice stores should not use the `@Spice` property wrapper.
307
-
308
305
### Require Restart
309
306
310
307
Setting `requiresRestart` to true will cause the app to be shut down after changing the value. Use this only when necessary, as users do not expect a restart.
0 commit comments