Skip to content

Cleaning up axios useEffect function

I keep getting this error for my useEffect. How can I stop getting this warning for my function below? I’m not sure what to add in the useEffect dependency array, I’ve tried using setAppState and the state itself but still getting this warning. Answer Check if the component is still mounted before…

Rebuilding/Parsing plain JavaScript object

Let’s say I have an object containing objects that have 30 key-value pairs each: My goal is to rebuild this object into something like this: The function below works like charm but I feel like there is a 10x better way to do it. I would love to see your suggestions on how I could improve it. Answer I&#8…

Blured background behind the div

I would like to make a pop up that will appear immediately after loading the page. In addition, I want the background behind the black div to be blured, unfortunately after using filter = blur (8px) whole page is blured. Help… Answer Use the backdrop-filter on your overlay element (the one that fully co…