#Common UseCases
The effect is similar to using tableView(_:didSelectRowAt:) method on UITableViewDelegate. You need to do few steps to be able to react on tapping on a cell.
BentoKithas a class namedInteractiveView. Your component's view needs to inherit from this class.- Add
didTap: (() -> Void)?closure to your component's init. - Bind
didTapwith the component view'shighlightingGestureproperty in the component'srender(in:)function:
//didTap's type is (() -> Void)?
view.highlightingGesture.didTap = didTap.map(HighlightingGesture.TapAction.resign)