Home

Posts

Optimizely for nye utviklere

Ganske raskt innså jeg hvor stabilt og gjennomtenkt Optimizely faktisk er. Rammeverket tilbyr etablerte mønstre som sikrer forutsigbar kvalitet. Følger du disse, så fungerer det. Slik er det ikke alltid i JavaScript-økosystemet, hvor valgfriheten noe

MK

Martin Kulvedrøsten Myhre

17:21-10/3/2025

Optimizing Block-Based Content Rendering in Next.js with Headless CMS

When we have built content-heavy websites with Next.js and a headless CMS (Sanity, in our case), one common challenge in all of the projects is rendering dynamic content blocks without bloating the website with JavaScript. Here's a scalable pattern f

MK

Martin Kulvedrøsten Myhre

12:11-1/23/2025

Nextjs project guidelines

These are my preffered project guidelines in nextjs: Project Structure - public/: For static assets - src/app/: For Next.js 13+ app router pages and layouts - src/components/: For reusable React components - src/hooks/: For custom hooks, organize

MK

Martin Kulvedrøsten Myhre

13:00-9/5/2024

Handling domain specific locale in next.js

When we deployed https://inmeta.no we decided to add a swedish (.se) page but we wanted to completly divide them when it comes to content. This meant we would not be doing the traditional /[locale]/...content also called i18n routing. Turned out tha

MK

Martin Kulvedrøsten Myhre

06:30-8/29/2024

Event listener hook for react

Events can be very hard to work with in react so i made a type safe hook that simplifies the process. The last thing i want is to download a whole hook library just for one hook so the simplest thing is to add it yourself. Usage:

MK

Martin Kulvedrøsten Myhre

12:30-10/25/2023

How to only deploy on spesific branches with Vercel

I found that its was not straight forward to configure Vercel to only deploy on the main branch so here is a guide and i hope it saves you some time. Note that in this project i am using Next.js but it should work with most frameworks. First we nee

MK

Martin Kulvedrøsten Myhre

10:00-9/26/2022