Skip to content

Support Equatable for Closure Bindings on ConnectableView's Props Type. #40

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

Merged
merged 2 commits into from
May 4, 2020

Conversation

StevenLambion
Copy link
Owner

The ActionBinder can return closures that bind to a dispatchable action, but this breaks the synthesized support of Equatable on the Props associated type for ConnectableView. Instead, this PR wraps the closures in an ActionBinding like all other bindings. This provides away to check for equability internally. For closures, this will always return "true".

Worker Performed

  • Updated ActionBinder to return an ActionBinding for all bind functions.
  • Added an isEqual property to ActionBinding as a hack around Equatable to allow closures to always return true.

@StevenLambion StevenLambion changed the title Support equatable for Closure Bindings on ConnectableView's Props Type. Support Equatable for Closure Bindings on ConnectableView's Props Type. May 4, 2020
@StevenLambion StevenLambion merged commit 301cf38 into master May 4, 2020
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