Level up your frontend skills with bite-sized tutorials and master the art of frontend development with the help of Webtips

Guided roadmaps →
Joined May 2020
Webtips retweeted
💡 Want to loop through an object? Use Object.entries combined with a forEach to read both keys and values:
1
1
100
💡 Want to prevent elements from receiving click events? Here are three solutions you can use: 1️⃣ Set the `disabled` attribute in HTML 2️⃣ Set `pointer-events` to `none` in CSS 3️⃣ Call `event.preventDefault` in JavaScript
1
1
104
💡 Want to display a JavaScript object in a readable way in your React app? You can use a combination of Object.keys with a map to create a loop and display the data in a tabular format:
1
1
97
💡 JavaScript tip(2): If you want to remove duplicates from your array, make a `Set()` out of it, and spread it back into an array:
4
44
3
400
37,595
Using the Local Storage API is a great way to store small sets of data, such as user preferences in the browser, without having to rely on a database. It has: ✅ Easy to use API ✅ Low effort to implement ✅ Supports offline access ✅ Improved data privacy
1
61
💡 Do not confuse Local Storage with Sessions Storage. While both are client-side storage with a similar API, they have a key difference: ✅ Local Storage is persistent, retained after session 🚫 Session Storage is temporary, cleared after session
1
44
Here are four patterns you can use in React to improve your codebase: 1️⃣ Child-to-parent communication: Most commonly, you want to lift your state when you want to pass data from child-to-parent components. However, you can also use callback functions:
1
1
106
Here are three different ways to use the Promise API in JavaScript: 1️⃣ Use Promise.all to handle multiple promises at once
1
56
3️⃣ Use Promise.race to get the fastest resolved or rejected promise
1
34
Webtips retweeted
Want to benchmark your JavaScript code? You can use the Performance API. Copy the following helper function to your project to use it:
1
1
104
Carousels are a common way to present a list of media in a limited space. Learn how you can build the following animated Carousel component in React with the help of CSS transitions: webtips.dev/animated-carouse…
1
89
Modals are a great way to display information outside the regular content flow. You can create them natively in HTML in three simple steps: 1️⃣ Create the modal using a dialog element 2️⃣ Use form method="dialog" to close modals 3️⃣ Use dialog.showModal to open the modal
1
130
Webtips retweeted
💡 Do you need to get query parameters in your React components? Simply use the URLSearchParams:
1
1
1
144