Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: PresentationReducer issue message mentions deprecated sheet(store) API #3545

Open
3 tasks done
KaiOelfke opened this issue Jan 5, 2025 · 0 comments
Open
3 tasks done
Labels
bug Something isn't working due to a bug in the library.

Comments

@KaiOelfke
Copy link

Description

The reported issue linked below should be updated as sheet(store:) is deprecated. I didn't make a PR as I'm not sure if you want to keep the SwiftUI sentence with sheet(item) or remove that completely.

An "ifLet" at "\(self.fileID):\(self.line)" received a presentation action when \
        destination state was absent. …

          Action:
            \(debugCaseOutput(action))

        This is generally considered an application logic error, and can happen for a few \
        reasons:

        • A parent reducer set destination state to "nil" before this reducer ran. This reducer \
        must run before any other reducer sets destination state to "nil". This ensures that \
        destination reducers can handle their actions while their state is still present.

        • This action was sent to the store while destination state was "nil". Make sure that \
        actions for this reducer can only be sent from a store when state is present, or \
        from effects that start from this reducer. In SwiftUI applications, use a Composable \
        Architecture view modifier like "sheet(store:…)"

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

Irrelevant

Actual behavior

Irrelevant

Reproducing project

Irrelevant

The Composable Architecture version information

main

Destination operating system

Irrelevant

Xcode version information

Irrelevant

Swift Compiler version information

Irrelevant
@KaiOelfke KaiOelfke added the bug Something isn't working due to a bug in the library. label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working due to a bug in the library.
Projects
None yet
Development

No branches or pull requests

1 participant