Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (19 loc) · 491 Bytes

tap.md

File metadata and controls

31 lines (19 loc) · 491 Bytes

.tap(intercepter) => Self

Invokes intercepter and returns itself. intercepter is called with itself. This is helpful when debugging nodes in method chains.

Arguments

  1. intercepter (Self): the current ReactWrapper instance.

Returns

Self: the current ReactWrapper instance.

Example

const result = mount((
  <ul>
    <li>xxx</li>
    <li>yyy</li>
    <li>zzz</li>
  </ul>
)).find('li')
  .tap(n => console.log(n.debug()))
  .map(n => n.text());