Skip to content

Adds default Never action type#6

Merged
mliberatore merged 1 commit intomainfrom
adds-default-action-implementation
Aug 31, 2022
Merged

Adds default Never action type#6
mliberatore merged 1 commit intomainfrom
adds-default-action-implementation

Conversation

@mliberatore
Copy link
Contributor

What it Does

For view stores that don’t have actions associated with them, this extension makes declaration and conformance much simpler. You basically just ignore the Action type and associated method all together.

How I Tested

  1. Commented out this extension and declared:
final class MyViewStore: ViewStore {
    var viewState = ""
}
  1. Got a compiler error that I didn't fully implement the ViewStore protocol.
  2. Uncommented the extension.
  3. Compiler error went away.

Notes

I believe it was @bcapps who originally authored this extension, so credit goes to him.

Screenshot

N/A

@mliberatore mliberatore requested review from Cordavi and Twigz August 31, 2022 21:05
@mliberatore mliberatore merged commit fa7d476 into main Aug 31, 2022
@mliberatore mliberatore deleted the adds-default-action-implementation branch August 31, 2022 21:09
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.

2 participants