joeybaker / react-element-query

Element queries for react components.
Other
86 stars 7 forks source link

after first browser render, check sizes again (fixes #8) #9

Closed jokeyrhyme closed 8 years ago

jokeyrhyme commented 8 years ago

I've added a second call to sizeComponent() a few frames after componentDidMount().

I tried setTimeout(fn, 0) and that was too early, and I also tried setTimeout(fn, 1e3) and it worked but the delay was far too visibly obvious.

Let me know if you'd like a squash, or if you'd like me to undo some of the other changes I snuck in (as separate commits), or if you have other comments.

Fixes #8

joeybaker commented 8 years ago

Thanks @jokeyrhyme! Can you take a look at why the tests are failing?

jokeyrhyme commented 8 years ago

Weird. It's passing the browser tests now in Travis CI, but is still coming up with a failure. I'll look into this later today perhaps.

joeybaker commented 8 years ago

Thanks @jokeyrhyme!

jokeyrhyme commented 8 years ago

@joeybaker there we go. It was a Travis CI environment issue: not having an X service available for Firefox to use. Green!

joeybaker commented 8 years ago

@jokeyrhyme Thanks! Released as v2.0.2, and added you as a collaborator. Just use npm run release [patch|minor|major] to publish to npm.