TypeError: undefined is not an object (evaluating 'reminder.map')

this is my reminder-list.tsx, how many time i tricked it, i always fail to do that, how to fix it i always got the TypeError: undefined is not an object (evaluating ‘reminder.map’) error import { ReminderDetails } from "@/types/types"; import React from "react"; interface ReminderListProps { reminder: ReminderDetails[]; } const ComponentReminderList: React.FC<ReminderListProps> = ({ reminder… Read More TypeError: undefined is not an object (evaluating 'reminder.map')

Do I need to put a text in App.tsx or do I have to create a separate file?

I have a question for a React file (I’ve just started). Do I have to put text in App.tsx for example: <h1>Hello World!</h1>, or do I have to create a separate file like Text.tsx and import it into App.tsx? Thanks for your help! I’ve looked everywhere on the Internet, but I haven’t found a site… Read More Do I need to put a text in App.tsx or do I have to create a separate file?

Type 'Element' is not assignable to type 'string' in .tsx file

I have this problem to add form element in tsx file. import { AuthLayout } from "../layout/AuthLayout" export const LoginPage = () => { return ( <AuthLayout title=’Login’> <form> bla bla bla </form> </AuthLayout> ) } enter image description here >Solution : The error message is telling you that the AuthLayout component is expecting a… Read More Type 'Element' is not assignable to type 'string' in .tsx file

JSX element type 'Icon' does not have any construct or call signatures

I am relatively new to typescript and trying to diagnose an error. I’m making sidebar navigation and trying to pull an icon from my navigation array. Array: const menuItems = [ { id: 1, label: "Dashboard", icon: <ComputerDesktopIcon />, link: "/" }, { id: 2, label: "Page 2", icon: <AcademicCapIcon />, link: "" }, {… Read More JSX element type 'Icon' does not have any construct or call signatures

How can I filter this data and return an array matching the condition in JavaScript?

This is the data I am working with below. const data = [ { name: "Frank Blanchard", gender: "male", friends: [ { name: "Corina Irwin", gender: "female", sub_friends: [ { name: "Alyssa Shelton", eyeColor: "brown", gender: "female", }, { name: "Patrice Morton", eyeColor: "blue", gender: "female", }, { name: "Hazel Berry", eyeColor: "blue", gender: "female",… Read More How can I filter this data and return an array matching the condition in JavaScript?

React router with typescript how to import intrinsic attributes

first time using Typescript, i’m rendering a component inside of a map like this: interface chatInterface { sender: string; avatar: string; content: string; time: string; } <> {eachUser?.chats.map((item) => item.messages.map((obj: chatInterface, index: number) => { return <ChatPage key={index} message={obj} />; }) )} </> And the ChatPage component is this: function ChatPage(props: { message: chatInterface })… Read More React router with typescript how to import intrinsic attributes