Skip to content

Cell model closures should receive dataSource/delegate function params #102

Description

@jessesquires

Most of the closures for cells at () -> Void
https://github.com/plangrid/ReactiveLists/blob/master/Sources/Typealiases.swift#L19-L32

Instead, the should receive the params from the method in which they are called, for example:
typealias DidSelectClosure = (tableView, indexPath) -> Void

It's not uncommon to need access to these values to perform certain operations.


Also of note:

Why not just define functions on the *CellViewModel` protocols? Seems like a much simpler design. No need for the typealiases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions