Search Results

Showing results for "javascript"

Latest Articles

Cover Image for React: why child component doesn"t update when prop changes
htmljavascript

React: why child component doesn"t update when prop changes

Published on September 2, 2023

# React: Why child component doesn't update when prop changes? šŸ¤” You're coding away in React, feeling pretty confident, when suddenly you hit a roadblock. You have a parent component, let's call it `Container`, and it has a child component called `Child`

Cover Image for How to delete an item from state array?
arraysjavascript

How to delete an item from state array?

Published on September 2, 2023

## How to Delete an Item from a State Array in React: A Beginner's Guide Have you ever encountered the daunting task of deleting an item from a state array in React? Fear not! In this guide, we will walk you through the common issues and provide you with

Cover Image for Why is immutability so important (or needed) in JavaScript?
javascript

Why is immutability so important (or needed) in JavaScript?

Published on September 2, 2023

# The Importance of Immutability in JavaScript šŸš€ Are you currently working with React JS or React Native frameworks? If so, you've probably come across the term "immutability" or even stumbled upon the Immutable-JS library. But have you ever wondered why

Cover Image for How to update React Context from inside a child component?
javascript

How to update React Context from inside a child component?

Published on September 2, 2023

# How to update React Context from inside a child component? šŸ’»šŸ”„ Are you having trouble updating the React Context from inside a child component? Don't worry, we've got you covered! šŸ¤ In this guide, we'll walk you through a simple and effective solution

Cover Image for Axios - DELETE Request With Request Body and Headers?
httpjavascript

Axios - DELETE Request With Request Body and Headers?

Published on September 2, 2023

# Axios - DELETE Request With Request Body and Headers? šŸ‘‹ Hey there! Are you programming in ReactJS and trying to send a DELETE request to your server using Axios? šŸ˜• If you're struggling with adding headers and a request body to your DELETE request, yo

Cover Image for No restricted globals
javascript

No restricted globals

Published on September 2, 2023

šŸ“¢ Hey techies! Have you ever faced the dreaded "Unexpected use of 'location' no-restricted-globals" error while working with React and Redux? šŸ¤” Don't fret! In this blog post, I'll guide you through common issues related to this error and provide you with

Cover Image for Can I set state inside a useEffect hook
javascript

Can I set state inside a useEffect hook

Published on September 2, 2023

# šŸŽ‰ Can I set state inside a useEffect hook? šŸ¤” So you're wondering if you can set state inside a useEffect hook? šŸ¤” Well, my friend, you've come to the right place! Let's dive into this common question and find out the answer together. šŸ’Ŗ ## šŸ“š Underst

Cover Image for Concatenating variables and strings in React
ecmascript-6htmljavascript

Concatenating variables and strings in React

Published on September 2, 2023

# How to Concatenate Variables and Strings in React Hello fellow React enthusiasts! šŸ‘‹ Are you struggling to incorporate React's curly brace notation and an `href` tag? Do you want to dynamically generate values for HTML attributes in your React app? Look

Cover Image for Correct way to push into state array
javascript

Correct way to push into state array

Published on September 2, 2023

# The Correct Way to Push into a State Array in React šŸ“ *TL;DR: Using the `push` method directly on an array when updating the state in React can lead to unexpected issues with mutability. Instead, you should use the `concat` or spread operator to create

Blog | Matheus Mello