I Have Problem with Printing One Reactjs Component in Another Using the ReactToPrint Library

When I attempt to print my component inside another Reactjs component, then it gives me this below error:
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports.

Link to my github repository is:GitHub - nomanmangalzai/my-tailoring-database: This database is developed in MERN-Stack for storing the size of clothes of a tailoring shop customers

hello and welcome to fcc forum :slight_smile:

  • can you pin point file and line number from your repo as well, thanks :slight_smile:

happy coding :slight_smile:

Okay, I will do that.

frontend/src/components/FetchOneNaaf.tsx and at line 658 is the code for printing
and the component that I want to print, its path is: frontend/src/components/PrintNaaf.tsx