[v8] React Example: Editable Data gives error #4205
-
Hi. This example: https://tanstack.com/table/v8/docs/examples/react/editable-data gives error: "React Hook "React.useState" is called in function "cell" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. (react-hooks/rules-of-hooks)" "React Hook "React.useEffect" is called in function "cell" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. (react-hooks/rules-of-hooks)" It can be run in codesandbox but I can't run the example in Visual Studio Code. Any ideas how to fix this? (Edit: I can run it if I disable eslint but would like to find a solution without doing that.) Best Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Any cell/header templates that use hooks can just use a classical function declaration: cell: function Cell () {
const [state, setState ] = useState()
} The function name should silence this issue. |
Beta Was this translation helpful? Give feedback.
Any cell/header templates that use hooks can just use a classical function declaration:
The function name should silence this issue.