Blog

Page 283 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for react-router vs react-router-dom, when to use one or the other?

react-router vs react-router-dom, when to use one or the other?

Published on September 2, 2023

# React-Router vs React-Router-Dom: When to Use One or the Other? 🔄🚦🤷‍♂️ Are you feeling lost in the world of React-Router and React-Router-Dom? 🌍 Don't worry, you're not alone! Many developers struggle to understand when to use one over the other. 🤔

Cover Image for Inline CSS styles in React: how to implement a:hover?

Inline CSS styles in React: how to implement a:hover?

Published on September 2, 2023

🔍 **Inline CSS styles in React: how to implement `:hover`?** If you're a fan of the inline CSS pattern in React, you might have encountered some roadblocks when trying to implement the `:hover` selector. The good news is that there are easy and effective

Cover Image for How to use refs in React with Typescript

How to use refs in React with Typescript

Published on September 2, 2023

📝 **Title: Mastering Refs in React with Typescript** ## Introduction Are you struggling to understand how to use refs in React while also enjoying the benefits of static typing and IntelliSense in Typescript? You're not alone. In this guide, we'll demys

Cover Image for <div> cannot appear as a descendant of <p>
javascript

<div> cannot appear as a descendant of <p>

Published on September 2, 2023

📝 **Blog Post: Understanding the "div cannot appear as a descendant of p" Warning** Hey there, tech enthusiasts! 👋 Today, we're going to dive into a common issue that many developers face - the dreaded `div cannot appear as a descendant of p` warning. �

Cover Image for Adding an .env file to a React project
environment-variables

Adding an .env file to a React project

Published on September 2, 2023

# Adding an .env file to a React project: A Complete Guide 😎🔑 Have you ever encountered the problem of wanting to hide your API key when committing your React project to GitHub? It can be a tricky situation, but fear not! We are here to guide you throug

Cover Image for Property "value" does not exist on type "Readonly<{}>"

Property "value" does not exist on type "Readonly<{}>"

Published on September 2, 2023

# 😱 The Dreaded Error: "Property 'value' does not exist on type 'Readonly<{}>'" 😱 So you're trying to create a form in React, displaying data based on an API return value. You followed the code from the official React documentation, but alas, an error h

Cover Image for Cannot update a component while rendering a different component warning
javascript

Cannot update a component while rendering a different component warning

Published on September 2, 2023

# ⚠️ Cannot update a component while rendering a different component warning So you're getting the dreaded "Cannot update a component while rendering a different component" warning in your React application. Don't panic! This warning typically occurs when

Cover Image for Attach Authorization header for all axios requests

Attach Authorization header for all axios requests

Published on September 2, 2023

# 🚀 Easy 🚀 Axios Authorization Header for All Requests in React/Redux So you want to attach an Authorization header to all Axios requests in your React/Redux application without manually adding it to each action? I got you covered! Let's dive into the b

Cover Image for React.js: Set innerHTML vs dangerouslySetInnerHTML
htmljavascript

React.js: Set innerHTML vs dangerouslySetInnerHTML

Published on September 2, 2023

📝 **React.js: Set innerHTML vs dangerouslySetInnerHTML** If you're a React.js developer, you might have come across the question of whether to use `innerHTML` or `dangerouslySetInnerHTML` when setting the content of an element. 🤔 In this blog post, we'l

Cover Image for React Hooks useState() with Object
javascript

React Hooks useState() with Object

Published on September 2, 2023

# Updating Nested State in React Hooks: A Complete Guide So, you're working with React Hooks and want to update a nested object state using the `useState()` hook. 🤔 You've come to the right place! In this blog post, we'll tackle the common issues faced w