Skip to content
Discussion options

You must be logged in to vote

In addition to what @pyrtsa mentioned, the $callLogs.publisher publisher emits the actual current value (not the previous value available in the willSet), and so if you delivered that to your action you would have the freshest value:

return .publisher {
    state.$callLogs.publisher
        .dropFirst()
        .map(Action.callLogsChanged)

    case .callLogsChanged(let callLogs):
        state.localCallLogs = callLogs
        return .none
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jiledaa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants