WebtipsHQ's profile picture. Level up your frontend skills with bite-sized tutorials and master the art of frontend development with the help of Webtips

Webtips

@WebtipsHQ

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

Webtips reposted

💡 Want to loop through an object? Use Object.entries combined with a forEach to read both keys and values:

WebtipsHQ's tweet image. 💡 Want to loop through an object? Use Object.entries combined with a forEach to read both keys and values:

Webtips reposted

💡 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

WebtipsHQ's tweet image. 💡 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

Webtips reposted

💡 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:

WebtipsHQ's tweet image. 💡 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:

Webtips reposted

💡 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:


Webtips reposted

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:

WebtipsHQ's tweet image. 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:

Webtips reposted

Want to benchmark your JavaScript code? You can use the Performance API. Copy the following helper function to your project to use it:

WebtipsHQ's tweet image. Want to benchmark your JavaScript code? You can use the Performance API. Copy the following helper function to your project to use it:

Webtips reposted

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-carou…


Webtips reposted

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

WebtipsHQ's tweet image. 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

Webtips reposted

💡 Do you need to get query parameters in your React components? Simply use the URLSearchParams:

WebtipsHQ's tweet image. 💡 Do you need to get query parameters in your React components? Simply use the URLSearchParams:

Loading...

Something went wrong.


Something went wrong.