React useBodyScrollLock hook
Do you need to lock the body scroll when a modal is open? Perhaps this custom hook can help.
30 seconds of code contains a curated collection of code articles covering a wide range of development needs. The collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Do you need to lock the body scroll when a modal is open? Perhaps this custom hook can help.
Ever wanted to show or hide one or more elements in HTML, using JavaScript? Turns out it's very easy to do so.
The Node.js test module is a new testing tool that's still in its early stages. Learn more about it in this short introduction.
Learn everything you need to know about higher-order functions with this short guide and level up your programming skills.
Ever had elements that horizontally overflow the viewport? This JavaScript function can help you identify them.
Generate all permutations of an array's elements or a string's characters using recursion.
Learn how to add or remove event listeners from elements with ease.
Create a typewriter effect animation with CSS variables and just a sprinkle of JavaScript.
Loading indicators are a staple of modern web design. Here are some CSS loaders to keep your users engaged while they wait.
Learn how to create a list with floating or sticky headings for each section.
Turn requestAnimationFrame()
into a custom hook to animate your React components.
Learn how to split a string into words, using the Intl.Segmenter
API.
Ever wanted to initialize an array with a sequence of generated values? Here's a few ways to do it.
Learn everything you need to know about JavaScript's call()
, apply()
and bind()
in this short guide.
Enums are part of TypeScript, but what about defining enums in plain old JavaScript? Here are a few way you can do that.
JavaScript arrays have a very robust API offering some amazing tools. Learn the 4 must-know JavaScript array methods in this quick guide.
Make your HTML documents more SEO-friendly by including these lines in your <head>
element.
Reviewing CSS code is a skill that takes time to master. Here are some tips from my personal experience to help you get started.
I hand picked 10 of my favorite CSS background patterns from MagicPattern for your next project. Get them now!
Learn how to persist state in React using hooks and localStorage
or sessionStorage
.
Learn how to create your own lazy loading image component in React.
JavaScript's this
keyword can confuse beginners and veterans alike. Learn how it works in different scenarios and start using it correctly.
Maps and objects are very similar, but they have some differences that can help you decide which one better fits your use-case.
Did you know you can get the index of an array item in a JavaScript for...of loop? Learn how with this bite-sized tip.