M
M
MrBodyJs2021-05-10 21:09:08
In contact with
MrBodyJs, 2021-05-10 21:09:08

How to fix an error when specifying id (React TS)?

Link to source code: https://pastebin.com/tFAVS2J0

Issue: TypeScript error in vkma/app/src/App.tsx(32,13):
Type '{ id: string; }' is not assignable to type 'IntrinsicAttributes & { children?: ReactNode; }'.
Property 'id' does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }'. TS2322

Line 32:<Test id={activeStory}/>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2021-05-10
@notiv-nt

React element !== html element
needs to pass all attributes itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question