diff --git a/Examples/SignUpDemo/Sources/Home/HomeViewModel.swift b/Examples/SignUpDemo/Sources/Home/HomeViewModel.swift index 9080da7..118a07e 100644 --- a/Examples/SignUpDemo/Sources/Home/HomeViewModel.swift +++ b/Examples/SignUpDemo/Sources/Home/HomeViewModel.swift @@ -25,7 +25,7 @@ public final class HomeViewModel: BaseViewModel< override public func transform(input: Input) -> Output { input.fromView.logoutTrigger - .sink { [weak self] in self?.navigator.next(.logout) } + .sink { [weak navigator] in navigator?.next(.logout) } .store(in: &cancellables) // Greeting is a one-shot publisher — no upstream state changes after diff --git a/Examples/SignUpDemo/Sources/Onboarding/SignUpViewModel.swift b/Examples/SignUpDemo/Sources/Onboarding/SignUpViewModel.swift index db9bcf3..d5fef85 100644 --- a/Examples/SignUpDemo/Sources/Onboarding/SignUpViewModel.swift +++ b/Examples/SignUpDemo/Sources/Onboarding/SignUpViewModel.swift @@ -99,8 +99,8 @@ public final class SignUpViewModel: BaseViewModel< .trackActivity(activity) } .switchToLatest() - .sink { [weak self] user in - self?.navigator.next(.signedUp(user)) + .sink { [weak navigator] user in + navigator?.next(.signedUp(user)) } .store(in: &cancellables) diff --git a/README.md b/README.md index ada5534..e24deeb 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,8 @@ public final class SignUpViewModel: BaseViewModel< .trackActivity(activity) } .switchToLatest() - .sink { [weak self] user in - self?.navigator.next(.signedUp(user)) + .sink { [weak navigator] user in + navigator?.next(.signedUp(user)) } .store(in: &cancellables)