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

Added new merge/combine function for the View #54

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

idugalic
Copy link
Member

Key Features of the Solution

The new function merge is introduced on the View component. It looks like a combine function, but these are different.

The two functions (combine and merge) explicitly handle different scenarios, which makes the code more readable and reduces potential runtime complexity.

combine:

Combines two views that operate on different event types (E and E2) into a new view operating on Sum<E, E2>.
This is ideal for cases where you need to handle separate types of events independently.

merge:

Composes two views that operate on the same event type (E) into a new view operating on E.
Ensures both views are updated in response to a shared event.

@idugalic idugalic merged commit 06b9ff0 into main Jan 25, 2025
3 checks passed
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.

1 participant