Replies: 1 comment 1 reply
-
Hi @appfrosch, I didn't pull down your code, but does it work if you change the scope to this: if let sidepanelStore = store.scope(state: \.sidepanel, action: \.sidepanel.presented) {
…
} This is necessary because your We should add some documentation on this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to refactor a working 3 panel
NavigationSplitView
to use the newobservation-beta
enhancements.I was able to change everything except the
IfLetStore
–when I try to refactor that to use the vanillaif let
, it produces the wrong type of store.Here's the diff:
The error message is as follows:
Cannot convert value of type 'Store<SidepanelFeature.State, PresentationAction<SidepanelFeature.Action>>' to expected argument type 'StoreOf<SidepanelFeature>' (aka 'Store<SidepanelFeature.State, SidepanelFeature.Action>')
.The
sidepanel
is declared like so:@Presents var sidepanel: SidepanelFeature.State?
, theSidepanelView
looks like this:What am I missing/doing wrong here?
I created a working sample in this repo–any hints are highly appreciated 😀
Beta Was this translation helpful? Give feedback.
All reactions