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

made Navigator Equatable #20

Merged
merged 2 commits into from Aug 3, 2021
Merged

made Navigator Equatable #20

merged 2 commits into from Aug 3, 2021

Conversation

3a4oT
Copy link
Contributor

@3a4oT 3a4oT commented Aug 3, 2021

I use SwiftUIRouter with Composable architecture to make things easier I've added Equatable conformance to Navigator so it can be used in TCA action or state.

  • made Navigator Equatable
  • added Tests

@frzi
Copy link
Owner

frzi commented Aug 3, 2021

Interesting, I never considered making Navigator conform to Equatable.

I'm not well-versed with Composable architecture in SwiftUI. Is initializing a new Navigator something that occurs? I'm curious whether a simple instance comparison would suffice or not, instead of a deep comparison:

extension Navigator: Equatable {
	public func == (lhs: Navigator, rhs: Navigator) -> Bool {
		lhs === rhs
	}
}

Thanks!

@3a4oT
Copy link
Contributor Author

3a4oT commented Aug 3, 2021

Is initializing a new Navigator something that occurs

Not really I just pass a reference to action when I need to navigate somewhere so I'm fine to simplify things! Thanks!

@frzi frzi merged commit f9152ef into frzi:main Aug 3, 2021
@3a4oT 3a4oT deleted the eq branch August 4, 2021 05:38
@3a4oT
Copy link
Contributor Author

3a4oT commented Aug 4, 2021

Thanks! can I count on the new release any time soon?=)

@3a4oT
Copy link
Contributor Author

3a4oT commented Aug 4, 2021

BTW. for some reason, I don't see these changes on the main branch. Am I missing something? cc @frzi

@frzi
Copy link
Owner

frzi commented Aug 4, 2021

I've reorganized pieces a bit as I was going through the documentation. Rest assured your changes are present in the main branch. 😉

Currently going through some things to prepare for 1.1.0, looking what to include and what not. If there's some urgency, you can tell Xcode to use the main branch instead of tagged releases in the meantime. 😉

@3a4oT
Copy link
Contributor Author

3a4oT commented Aug 4, 2021

Yeah, seems tit was a false-positive ping! Thanks

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

Successfully merging this pull request may close these issues.

None yet

2 participants