Hopp til hovedinnhold

Innhold om React

Totalt 143 innlegg

Side 3 av 10

Compute view logic during render in React

React
Artikkel (4 min)
Fra Caroline Odden
15.12.2022

Updating view logic based on some state or props is a common thing to do in a React application, and the go-to method is typically by putting every state update in one or more useEffects. However, this will lead to unnecessary updates and unmaintainable code. Let's take a look at how updating view logic is better by doing it during render rather than useEffects.

Azure Application Insights using Javascript SDK in Next.js

JavaScript, React
Artikkel (3 min)
Fra Toralf Frich
15.12.2022

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

React
Artikkel (4 min)
Fra Caroline Odden
14.12.2022

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

JavaScript, React
Artikkel (3 min)
Fra Toralf Frich
13.12.2022

Do you need help with setting up a simple custom server in Next.js? This trick will get you a long way!

Ha det bra, SPA

React
Artikkel (9 min)
Fra Kristofer Selbekk
07.12.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.

Type safe all the way with Remix

React
Artikkel (2 min)
Fra Kristofer Selbekk
04.12.2022

Want to be really, really type safe, both on the front and back ends? With Remix, that's the default!

React Context might not be the right solution for your app

React
Artikkel (8 min)
Fra Ole Anders Stokker
23.12.2021

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

React
Artikkel (4 min)
Fra Joakim Sjøhaug
22.12.2021

With React 18, a new hook is available which can slow down our UI on purpose 🤯 Why may we need such a hook? 🤔

Subscription pattern with Compound components in React

React
Artikkel (7 min)
Fra Jørund Amsen
20.12.2021

Compound component is a react design pattern popular in UI libraries such as Chakra, Reach, Semantic and Material. It allows us to write a declarative and flexible API for complex components that implicitly share a state. Today we'll look at an introduction and a slightly more complex example of the patthern

Something about lock files

React
Artikkel (6 min)
Fra Joakim Sjøhaug
15.12.2021

We've all been there: we created our first react project and was introduced to the lock file. Some took the time to understand it whereas others was scared of it and instinctively added it to the .gitignore file. This post will give a short description of the lock file, how we should treat it and use it correctly.

Communication with Bluetooth devices using React and TypeScript

React
Artikkel (8 min)
Fra Sivert Schou Olsen
12.12.2021

Bluetooth is a technology that you might use every day; This could be wireless headphones, game controllers or heart rate monitors, which all use Bluetooth. Until recently, I imagined technology like this required implementation of low level drives in C, but oh'boy, was I wrong! Thanks to Web Bluetooth, it is now possible to communicate with Bluetooth peripherals through the browser with JavaScript! We will explore how we can create a web app using React, TypeScript and Web Bluetooth to control our favourite smart lights to make our home ready for Christmas 🎅

Implementing unfurling URLs in Sanity

React
Artikkel (4 min)
Fra Kristofer Selbekk
09.12.2021

Want to add those nice-looking link previews you get when you share a link on Medium or Twitter? Then this article is for you!

Joyful onboarding with React Joyride

React
Artikkel (3 min)
Fra Sindre Moldeklev
07.12.2021

Have you ever had some new functionality that you would like to showcase for your users? Perhaps your userbase is not the most tech-savvy and they need some guiding when new features are shipped. React Joyride let's you easily create guided tours that your users will enjoy.

Create a useful link abstraction in Next.js

React
Artikkel (2 min)
Fra Kristofer Selbekk
07.12.2021

The internal link abstraction with Next.js less than perfect. Let's create a better one!

Building Tool Plugins for Sanity Studio

React, JavaScript
Artikkel (5 min)
Fra Aslak Sheker Mkadmi
06.12.2021

Learn how to easily build your own Tool Plugins to customize Sanity.