React Typescript allow to add custom data-* attributes. But is it possible to add custom attributes like \'name\' || \'test\' act. ?
in react 16+ it is possible, see
probem is that typescript didnt know about it(yet)
but you can still add @ts ignore for typechecking
{ //@ts-ignore
<span name="I'm causing a type error" data-test="I'm Working"/>
}
there is another way... skipping the static check (typescript don't do dynamic)
{
const allowedProps = {test: "not-data-attribute"}
<span {...allowedProps}/>
}