Windows.List in react-window
13:05 12 Mar 2026

I am trying to build a form-builder using Next.js, but I encounter this issue when trying to create a LivePreview. I am using a three-column layout (sidebar, canvas, LivePreview). It is supposed to be an open-source form-builder website, where people can create a form and share a link to the form.

I will add my folder structure. I am using a third-party package called react-window to try and memoize my array when mapping

folder structures of my projectI

## Error Type
Runtime TypeError

## Error Message
Cannot convert undefined or null to object


    at Object.values (:null:null)
    at LivePreview (src/app/_components/builder/LivePreview.jsx:105:21)
    at BuilderLayout (src/app/_components/builder/BuilderLayout.jsx:68:9)
    at FormBuilderPage (src/app/builder/[formId]/page.js:39:10)

## Code Frame
  103 |                 

Add fields to see preview

104 | ) : ( > 105 |
'use client';
import React from "react";
import { Input, TextArea, Checkbox, FieldLabel } from "@/components/ui";
import { List } from 'react-window';
import { useDeferredValue } from 'react';

// This is a separate component that renders ONE field (used by the List)
const FieldRow = ({ index, style, data }) => {

    const field = data[index];

    if (!field || !field.config) {
        return 
; } ; return (
{/* Render appropriate input based on field type */} {['EMAIL', 'PHONE'].includes(field.type) && ( )} {field.type === 'NUMBER' && ( )} {field.type === 'SHORT_TEXT' && ( )} {field.type === 'TEXTAREA' && (