0

const Hashable: React.SFC<{Element: string}> = ({ Element = 'div', ...props }) => <Element {...props} id={'someId'} />

ts error: Type '{ id: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'id' does not exist on type 'IntrinsicAttributes'.

How do I type the props (id) for the intrinsic element?

airwalker
  • 53
  • 2
  • 7

0 Answers0