Innhold om Frontend
Totalt 322 innlegg
Side 6 av 22
Azure Application Insights using Javascript SDK in Next.js
Do you need help with the Javascript SDK for Application Insights? Look no further! This guide will help you go from zero to hero in no time 📈
Do you need help with the Javascript SDK for Application Insights? Look no further! This guide will help you go from zero to hero in no time 📈
Use key to reset state in React
Resetting state in a React application is a common thing to do. You get some new data in your props, and you want to set your state back to the initial values, and often it is done with useEffect. However, useEffects can be messy and hard to understand, and it's because you (and I) are using them wrong (🔥). Let's take a look at how to solve this in a better way by using the key attribute.
Resetting state in a React application is a common thing to do. You get some new data in your props, and you want to set your state back to the initial values, and often it is done with useEffect. However, useEffects can be messy and hard to understand, and it's because you (and I) are using them wrong (🔥). Let's take a look at how to solve this in a better way by using the key attribute.
How to create a simple Custom Server in Next.js
Do you need help with setting up a simple custom server in Next.js? This trick will get you a long way!
Do you need help with setting up a simple custom server in Next.js? This trick will get you a long way!
Contrast is boring—can't someone else do it?
Having sufficient contrast in your website is one of those things which are very important but still very boring to fix—especially if your site uses multiple background colours. Well, be bored no more! color-contrast() is (hopefully soon) here to save us! Let's learn what it does.
Having sufficient contrast in your website is one of those things which are very important but still very boring to fix—especially if your site uses multiple background colours. Well, be bored no more! color-contrast() is (hopefully soon) here to save us! Let's learn what it does.
Hvilket problem prøver Webpack å løse?
Hva er egentlig greia med Webpack? I samme åndedrag hører du gjerne “loaders”, “plugins” og annen babbel. Hvilket problem er det Webpack egentlig prøver å løse?
Hva er egentlig greia med Webpack? I samme åndedrag hører du gjerne “loaders”, “plugins” og annen babbel. Hvilket problem er det Webpack egentlig prøver å løse?
:has() is here and you probably need it in your CSS
So, you've heard talk of a so-called :has() selector, but don't really know what it is. Or maybe you just clicked the article hoping to learn something new. Well, this article is for you! Now that :has() is supported by almost all major browsers (except Firefox where you need a feature flag …), it is time to learn what it is, why you should care and how you use it.
So, you've heard talk of a so-called :has() selector, but don't really know what it is. Or maybe you just clicked the article hoping to learn something new. Well, this article is for you! Now that :has() is supported by almost all major browsers (except Firefox where you need a feature flag …), it is time to learn what it is, why you should care and how you use it.
A smarter way of using T[keyof T]
In this article I will show how you can infer the value of a property in any object with generic typescript. This articles assumes you are already familiar with generics in typescript.
In this article I will show how you can infer the value of a property in any object with generic typescript. This articles assumes you are already familiar with generics in typescript.
Ha det bra, SPA
Det er leit å melde. Det er ikke lenger en god idé å rendre hele websiden din på klienten. En SPA er rett og slett ikke bra nok i 2022.
Det er leit å melde. Det er ikke lenger en god idé å rendre hele websiden din på klienten. En SPA er rett og slett ikke bra nok i 2022.
How to time your CSS animations in JavaScript
Type safe all the way with Remix
Want to be really, really type safe, both on the front and back ends? With Remix, that's the default!
Want to be really, really type safe, both on the front and back ends? With Remix, that's the default!
Migrating your data with sanity exec
Ever wished you chose a slightly different data structure for your structured content? Let's learn how to fix it!
Ever wished you chose a slightly different data structure for your structured content? Let's learn how to fix it!
Mapping more than lists
Using the function map to change the elements of a list has become a common pattern in modern programming languages. It is often used in Elm and map is also used in Elm for the Maybe and Result types.
Using the function map to change the elements of a list has become a common pattern in modern programming languages. It is often used in Elm and map is also used in Elm for the Maybe and Result types.
React Context might not be the right solution for your app
Contexts in React are great. They provide an easy solution for shared component state, avoiding prop drilling and many other common patterns. All that while being built into React itself. What is not to like about that, and when should we reach for other solutions?
Contexts in React are great. They provide an easy solution for shared component state, avoiding prop drilling and many other common patterns. All that while being built into React itself. What is not to like about that, and when should we reach for other solutions?
useDeferredValue in React 18
With React 18, a new hook is available which can slow down our UI on purpose 🤯 Why may we need such a hook? 🤔
With React 18, a new hook is available which can slow down our UI on purpose 🤯 Why may we need such a hook? 🤔
TypeScript Decoders and Where to Find Them
TypeScript is fantastic, but without Json Decoders, your code (probably) isn't type safe.
TypeScript is fantastic, but without Json Decoders, your code (probably) isn't type safe.