ReactiveLists icon indicating copy to clipboard operation
ReactiveLists copied to clipboard

Cell model closures should receive dataSource/delegate function params

Open jessesquires opened this issue 8 years ago • 0 comments

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.

jessesquires avatar Jan 29 '18 14:01 jessesquires