• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

garthenweb / react-viewport-utils / 104 / 3
73%
master: 73%

Build:
DEFAULT BRANCH: master
Ran 16 Feb 2020 01:39PM UTC
Files 8
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Feb 2020 01:34PM UTC coverage: 72.862% (-0.2%) from 73.081%
104.3

push

travis-ci

garthenweb
fix(useViewportEffect): support changing recalculateLayoutBeforeUpdate in combination with deferUpdateUntilIdle

When recalculateLayoutBeforeUpdate is used with a dynamic value in a
function, e.g. useRect, the function is not reassninged to the listener.
This can especially become an issue with deferUpdateUntilIdle.
In the example of useRect, the deferred function will be called with the
old element (which might be null) and the update which is triggered
afterwards containing the new function is not respected any longer.
Afterwards the dependency is not changing any longer, therefore the
state stays undefined.

Using a dynamic function that calls the latest function independent of
when it was registered fixes the issue.

Closes #16

194 of 318 branches covered (61.01%)

Branch coverage included in aggregate %.

445 of 559 relevant lines covered (79.61%)

11.48 hits per line

Source Files on job 104.3
  • Tree
  • List 0
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30
  • Travis Job 104.3
  • 02efe835 on github
  • Prev Job for on master (#103.1)
  • Next Job for on master (#105.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc