Velocidad de Escape

Velocidad de Escape: La cibercultura en el final del siglo

It has been a long time since the last time I wrote a post here, however, now that I have a little more free time I plan to resume writing. I hope this post is short. I want to tell you where the inspiration for the name of this blog came from... Since I was a child I have always been very interested in astronomy, however I never saw it possible to study something related in a third world country. However, that is not the story... One day, very normal in the life of every university student (I think) I went to the library, because I needed a bit of calm in my head, so I sat in an armchair...

Personal

Protected routes and authorization using React Router v6

In the project I am currently working on, a specific need arose, we should protect certain routes of a web application from certain user roles (for security reasons). For example, we have a page where administrators can add and delete users, this power can only be held by us (this must be a private page). **React Router v6** (latest version), it does not offer any functionality for this type of situation, the implementation is the developer's task. My first approach to the problem was to try to build a "wrapper" for the `Route` component of React Router: ```js import { Navigate, Route }...

React

Standard built-in objects in JavaScript

> The term "global objects" (or standard built-in objects) here is not to be confused with the global object. Here, "global objects" refer to objects in the global scope. > The global object itself can be accessed using the this operator in the global scope. In fact, the global scope consists of the properties of the global object, including inherited properties, if any. <a class="hover:no-underline text-blue underline" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects#standard_objects_by_category" target="_blank" rel="noreferrer">Standard built-in...

JavaScript

Destructuring: From Zero to Hero

**Destructuring assignment** is probably one of the most importante features that came with ES6. Basically allow us unpack values from arrays, or properties from objects, into distinct variables. In older versions of ECMAScript this was a bit cumbersome: "Destructuring" arrays: ```js var myArr = ["Andres", "Bedoya"] // ES5 and previous var firstName = myArr[0] var lastName = myArr[1] // ES6 const [firstName, lastName] = myArr ``` "Destructuring" objects: ```js var myObject = { firstName: "Andres", lastName: "Bedoya" } // ES5 and previous var firstName = myObject["firsName"] var...

JavaScript