Teaching CSS to a Coder ? (How to Lazy Load Images)
У вашего броузера проблема в совместимости с HTML5
Sponsored by: ForkLift, thanks! Try the most advanced file manager and file transfer client for macOS and use the coupon code DEVTIPS to get 50% off. http://bit.ly/2IwUBMT
David teaches MPJ about lazy loading images for better mobile performance and the CSS aspect-ratio box padding trick. MPJ is NOT convinced.
Can you solve it in a different way - write that in the comments plz!
Aspect-ratio boxes on CSS Tricks has covered this hack in great extent.
? https://css-tricks.com/aspect-ratio-boxes/
To properly access the DOM in React, we should have used refs (thanks to @23luski and @Rela takera in the comments)
☝️ https://reactjs.org/docs/refs-and-the-dom.html#creating-refs
The editor is called Visual Studio Code and is free. Look for the Live Share extension to share your environment with friends.
? https://code.visualstudio.com/
DevTips is a weekly show for YOU who want to be inspired ? and learn ? about programming. Hosted by David and MPJ - two notorious bug generators ? and teachers ?. Exploring code together and learning programming along the way - yay!
DevTips has a sister channel called Fun Fun Function, check it out!
❤️ https://www.youtube.com/funfunfunction
#css #hack #reactjs