Skip to main content

NextJS Essential TS, Etc


Typescript Guide

PropsPass

import React from "react";

interface ModalProps {
open: boolean;
title: string;
children: React.ReactNode;
onOpenChange: (open: boolean) => void;
}

const Modal: React.FC<ModalProps> = ({
open,
onOpenChange,
title,
children,
}) => {}

metadata

// layout.tsx
export const metadata: Metadata = {
title: "Spotify",
description: "Listen to music",
};