Next.js Discord

Discord Forum

Typescript Error for field type ReactNode:

Unanswered
Green Kingfisher posted this in #help-forum
Open in Discord
Green KingfisherOP
Error:
'Home' refers to a value, but is being used as a type here. Did you mean 'typeof Home'?



ui.type.ts:
import { ReactNode } from 'react';

export type TFloatingDockItem = {
  title: string;
  icon: ReactNode;
  href: string;
};



floating-dock-items.data.ts:
import { TFloatingDockItem } from '@/types/ui.type';
import { Home } from 'lucide-react';

export const FLOATING_DOCK_DATA: TFloatingDockItem[] = [
  {
    title: 'Home',
    href: '/',
    icon: <Home />,
  },
];

2 Replies