skip to Main Content

just testing Tanstack react-table lib with react + Typescript, and it seams that I can’t return tsx/jsx from cell function of ColumnDef:

enter image description here

Am I missing something here?

2

Answers


  1. Chosen as BEST ANSWER

    Well it turned out that my file was with extension .ts and not .tsx, so changing from .ts to .tsx solved problem.


  2. Identify the difference between JSX and JS (brackets).

    cell: ({ getValue }) => <div>{getValue()}</div>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search