Category: React
-
how to make middleware on spesific routes in ElysiaJS?
How to Make Middleware on Specific Routes in ElysiaJS ElysiaJS is a powerful framework for building web applications using TypeScript. One of its key features is the ability to use middleware functions to handle requests and perform additional processing before reaching the final route handler. In this blog post, we will explore how to create…
-
Array of Typed Objects – Extract Union Type of Values for a Given Key
Array of Typed Objects – Extract Union Type of Values for a Given Key When working with TypeScript, you may come across a scenario where you have an array of objects with different properties, but you want to extract the union type of values for a specific key. This can be useful when you want…
-
How do I encrypt data from a frontend flutter to a backend nodejs and vice versa?
How to Encrypt Data from a Frontend Flutter to a Backend Node.js and Vice Versa When it comes to transmitting sensitive data between a frontend Flutter application and a backend Node.js server, encrypting the data is crucial to ensure its security. In this blog post, we will explore two common encryption techniques that you can…
-
Display empty value when no results with extra menu item
Display empty value when no results with extra menu item When working with TypeScript, it is common to encounter scenarios where you need to display a list of items, but also want to show an empty value or an extra menu item when there are no results. In this blog post, we will explore two…
-
How to use properly useMemo substitutes?
How to Use Properly useMemo Substitutes? When working with TypeScript, you might come across situations where you need to optimize the performance of your React components. One way to achieve this is by using the useMemo hook, which memoizes the result of a function so that it only recomputes the value when the dependencies change.…
-
Sequelize not working correct with typescript
Sequelize not working correctly with TypeScript If you’re working with TypeScript and Sequelize, you may have encountered some issues with the integration of these two technologies. In this blog post, we will explore some common problems and provide solutions to help you get Sequelize working correctly with TypeScript. 1. Incorrect type definitions One common issue…
-
How to generate a dynamic IonModal using useIonModal
How to Generate a Dynamic IonModal using useIonModal Ionic Framework provides a powerful set of UI components to build mobile applications. One of the commonly used components is IonModal, which allows you to display a modal dialog on the screen. In this blog post, we will explore how to generate a dynamic IonModal using the…
-
How to create alias for type?
When working with TypeScript, you may come across situations where you need to create an alias for a type. This can be useful for simplifying complex types or for giving more descriptive names to existing types. In this article, we will explore different ways to create aliases for types in TypeScript. Using the ‘type’ keyword…
-
Not able to send cookies using `fetch` in NextJS server side component (app router)
Not able to send cookies using `fetch` in NextJS server side component (app router) If you are using Next.js and encountering issues with sending cookies using the fetch function in the server-side component (app router), you’re not alone. This problem often arises due to the way Next.js handles server-side rendering and the need to pass…
-
Fill up an array with integer by using a range
Fill up an array with integers by using a range When working with TypeScript, you may often come across the need to create an array of integers that follow a specific range. This can be useful in various scenarios, such as generating a sequence of numbers for calculations or populating a dropdown menu with options.…