dev.to dev.to

React Hook - Clean Up useEffect

From: https://wareboss.com/react-hook-clean-up-useeffect/ Last article we learn about Asynchronous actions on useEffect and our correct usage (React Hook - Async funcion in useEffect). Today we will see how to use the clean up function of useEffect React Hook. When you update a state from an unmounted component, React will throw this error: "Can't perform a React state update on an unmounted component. This is a no-op, but it...

dev.to dev.to

Funciones en Javascript. 7 formas de declarar una función

Por definición una función es un procedimiento, un conjunto de sentencias que realizan una tarea o calculan un valor. En Javascript este es uno de los conceptos más importantes y versátiles de este lenguaje de programación. Una de las características más importantes de las funciones en Javascript es su versatilidad. En Javascript las funciones son diferentes a las funciones de otros lenguajes de programación. En Javascript las...

dev.to dev.to

Be careful with Docker ports!

Not too long ago I got an email from my hosting provider, actually a forwarding from the BSI (German Institute for Information Security) that stated my Elasticsearch installation was accessible from the outside. I was flushed, as I thought I had secured the Elasticsearch Docker container behind nginx, which had basic authentication enabled. Fact is: Docker had bound the 9200 port directly in the iptables configuration, ignoring the UFW...

dev.to dev.to

Lessons learned from 4 years of working with cloudformation

I started working with cloudformation 4 years ago. Since then I screwed up many pieces of infrastructure. Some of them were in production. But every time I screwed up something I learned something new as well. Thanks to my ignorance 4 years later I can share some of the most important lessons I learned. Lesson 1: verify changes before deploying changeset I learned this lesson pretty early in my journey with cloudformation....

dev.to dev.to

Strapping Django & Android Application

Have you developed an web application using Django and Thinking of extending it to android application? Then you are at perfect place. Let's get Started!! Our Plan: 1] Creating the Django Web Application: We will be creating basic user profile mechanism in django web application. 2] Creating API to Communicate with Android: We will be creating the Controllers(Django Views) which will return JSON response (will act as API) Which...

dev.to dev.to

Wordpress Vs. Headless Wordpress For Your Next Project

First off, if you already know a front end framework like angular or react, you don't need to read this post. I wrote this post for Wordpress users (even power users), those in hybrid dev roles, and those who have customized some Wordpress themes, or built a plugin or two, and are looking for resources on how to level up their game a little bit. It's also written for DIY-er's who aren't afraid to tinker a bit until they get something...

dev.to dev.to

Indexing objects in TypeScript

This is a topic that comes up every now and again, so I figured it'd be useful to write a post about it. Imagine you have code like this: // an object defining how to display specific user statuses in the UI const statusDisplays = { online: 'Online', offline: 'Offline', busy: 'Busy', dnd: 'Do Not Disturb', } // fetch the status of a user by their ID const userStatus = getUserStatus(myUserID) // get the displayed status...

dev.to dev.to

Learning Should Be Fun: ReactJS + Twitch API Tutorial

How many todo apps and calculators does the world need? Learning to code is hard, which makes it tough to stay motivated sometimes. It doesn't help that most beginner tutorials are almost always the same rehashed projects that are not only boring to follow but won't help you get a job IMO the best way to learn is mixing together things you enjoy to create something new. One example would be combining programming with gaming...