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

Updates the status of the previous screen after the screen is dismissed #72

Open
Seokki-Kwon opened this issue Nov 5, 2024 · 0 comments

Comments

@Seokki-Kwon
Copy link

After writing is complete, I want to close the screen and receive a new list.

Structure

MainCoordinator
|- MainTabFeature
    |-PostListFeature
|- ComposeCoordinator
     |-ComposeFeature
|- Notification

After the ComposeFeature task is completed, I want to update the post list status of the PostListFeature, but the view is not updated.

Currently, we are using a method of initializing the path by pulling up the state.

            case .router(.routeAction(_, action: .composeEdit(.compose(.cancleButtonTapped)))):
                return .send(.mainTab(.postList(.listUpdate)))
            case let .mainTab(.postList(.postListResponse(response))):
                state.mainTab.postList.posts = response
                state.isPresentedSheet = false
                state.routes = [.root(.mainTab(state.mainTab))]
                return .none

I'm a beginner at TCA I would appreciate it if you could provide a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant