Composing the React Context Provider and useContext Hook so they can be used and re-used comfortably

Image for post
Image for post
Photo by Paulius Dragunas on Unsplash

Introduction

App we will develop


Using Intersection Observer for lazy-loading images in React by creating and using a custom Hook: useIO

Image for post
Image for post
Photo by Wenniel Lun on Unsplash


useBreakpoint hook #extended

Image for post
Image for post
Photo by Alan Bishop on Unsplash

Matching the Media


Creating a custom Hook to get window widths or breakpoints

Image for post
Image for post
Photo by Mikael Kristenson on Unsplash

What and When We Need to Measure?


Image for post
Image for post
Photo by marcos mayer on Unsplash
const fs = require('fs');fs.readFile('someFilePath', (err, data) => {
if(err){
//do something when error occurred while reading file
}
//do something here with the file data
})


Understanding how modularity works and the things we can use

Image for post
Image for post
Photo by Markus Spiske on Unsplash

How To Create a Module


Image for post
Image for post
Photo by Markus Spiske on Unsplash

Introduction

About

Udit Tyagi

Software Developer at K12 Techno Services

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store