If I were to point out a single concept that is critical to understand in React development, it would be state management.
So what is React state management? How is it different from managing data in C# or Java? Let’s find out! 🙂
Become a better .NET full stack web developer
If I were to point out a single concept that is critical to understand in React development, it would be state management.
So what is React state management? How is it different from managing data in C# or Java? Let’s find out! 🙂
As a frontend developer, one of the things you should know is how TypeScript compiler works. Sooner or later you will work with this language (which I sincerely wish you!), so it’s good to know your stuff 😉
In this article, I will explain TypeScript compiler to you in simple terms. We will avoid complex stuff – only what you need for your everyday frontend developer’s work. We will not explore the inner workings of the TypeScript compiler Instead, we’ll see some practical implications of its workings for TypeScript developer. Let’s dive in 🙂
If you asked me 5 years ago what a JavaScript bundler is, I’d probably tell you it’s something people fight with for hours, just to get a simple web app set up 🤪 While this might have been closer to the truth in 2018, a lot has changed in JavaScript ecosystem until today.
If you’re starting your web development journey, or maybe have already dived into it, but are not really sure what JS bundlers are and what’s their role, you’re reading a proper piece of explanation 🙂
If you use external libraries in your application, wrapping them may be very helpful. How to wrap external libraries and why it’s worth doing that? Today we’re going to dive into that, based on a TypeScript web app example 😉
Meatballs menu (⋯), also called three horizontal dots menu, is a great way of providing contextual options for grid rows. In this article, I will show you how to add the meatballs menu to a table built with @tanstack/react-table.
After reading this article, you will know how to add such a menu to your React app. The end result will look as in the highlighted picture of this article 😉
I love VS Code 😍 There’s no better web code editor out there for me. Today, I’m going to share with you the 10 VS Code extensions that make my life easier. I can’t imagine coding without them. Let’s dive into it!
Continuing with weird errors you might encounter in JavaScript world, I have another one: Visual Studio Code IntelliSense loading infinitely 😀 Solution included, of course!
The symptoms of this issue are putting your mouse on something where you’d expect the IntelliSense guidelines, but instead you only see the “Loading…” text.
In this short article, I’m sharing the reason of this issue and my way of fixing it.
Have you ever needed to synchronize types in your frontend app with the backend API?
If you ever had an API action defined like that in your controller:
public record UserViewModel(Guid Id, string Name, string LastName, string Login, | |
bool IsActive, int LoyaltyPoints, AddressViewModel? Address = null); | |
// … | |
public List<UserViewModel> AllUsers() | |
{ | |
var usersViewModels = TestDataGenerator.GetTestUsers(); | |
return usersViewModels.OrderBy(uvm => uvm.Name).ToList(); | |
} |
and fetched this data using TypeScript in the following way:
getAllUsers = async (): Promise<UserViewModel[]> => { | |
const url = `${this.apiEndpoint}/AllUsers`; | |
const response = await fetch(url); | |
const users = (await response.json()) as UserViewModel[]; | |
return users; | |
}; |
at some point, you probably also experienced the desynchronization of backend (C#, in our example) and frontend (TypeScript) types definitions. What if someone has changed the C# version of UserViewModel
, but no one corrected its TypeScript’s equivalent?
Your TypeScript fetching code will tell nothing about that. There will be no error, even though the fetched data doesn’t match the expected UserViewModel
type.
I’ll try to address this issue in this article 🙂 Let’s see how typing API responses with zod
can help us here.
I recently struggled for a while with an npm
error thrown when executing npm install
of some package. The error message was npm ERR! enoent ENOENT: no such file or directory, rename 'D:\\WebApp\\node_modules\\lz-string' -> 'D:\\WebApp\\node_modules.lz-string.DELETE'
Finally, I found a solution and a reason for that issue.
For the past year I’ve been working on a JavaScript project for my client. We have a mid-size web application. We use React as the web development framework. Few months ago we decided to start migrating to TypeScript.
Today I can say that it was the best decision we could make. TypeScript makes working with JavaScript, which is sometimes surprising and quite hard to understand, so much better experience. However, there were some challenges on this journey. If you want to know what issues we met and how we solved them, but also what huge advantages TypeScript gave us – read on 😉
I will not discuss TypeScript itself in this article. This is a pure recap of challenges and the experience I gained when migrating to TypeScript.