ReactiveLists
ReactiveLists copied to clipboard
Cell model closures should receive dataSource/delegate function params
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.