Category: Javascript

  • How to call a REST API with REACT and Typescript using Axios Library

    How to call a REST API with REACT and Typescript using Axios Library

    In this example, I will show you how to call a REST API using the popular Axios library with React and TypeScript. First, you need to install Axios: Or if you are using Yarn: Now, let’s create a simple React component that fetches data from a REST API and displays it. For this example, we […]

  • How to resize and crop an image using Typescript

    How to resize and crop an image using Typescript

    In this article, I will share a simple snippet in Typescript, that you can easily convert to Javascript, to resize and crop images without relying on any third-party libraries. This code snippet first prompts you to select a local image using an HTMLInputElement. Once an image is selected, using the FileReader API, it loads the […]