Understanding setState in componentDidMount to Measure Elements Without Transient UI State
In this lesson we’ll explore using
setState to synchronously update in
componentDidMount. This allows for us to use
getBoundingClientRect or other synchronous UI calls and make changes to the UI without a transient UI state.
Originally published at codedaily.io on March 1, 2018.
I publish articles and screencasts weekly on React, React Native, and everything else related to web development. Be sure and follow me on Twitter.
Join our Newsletter to get the latest and greatest content to make you a better developer.
Check out my course and you too can master React Native Animations! Use the coupon code: codedaily for 60% off!