A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://enzymejs.github.io/enzyme/docs/api/ShallowWrapper/tap.html below:

tap(intercepter) ยท Enzyme

.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 ShallowWrapper instance.
Returns

Self: the current ShallowWrapper instance.

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4