Questions tagged [intrinsicattributes]
13 questions
30
votes
2 answers
Property does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }'
I have react project created by Create-React-App having following packages (mentioning packages related to my issue) :
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"typescript":…

Ritesh
- 4,720
- 6
- 27
- 41
2
votes
1 answer
React: Typescript not recognizing intrinsic attributes when extending HTMLAnchorElement
I have a simple anchor tag component that extends the native tag.
I've defined my typescript interface to extend React.HTMLAttributes, but when I attempt to use component A and pass props like rel and target I get…

marzipan
- 151
- 1
- 13
1
vote
1 answer
Property 'theme' does not exist on type 'IntrinsicAttributes'.ts(2322)
I am a junior in TypeScript, I am trying to create a dark mode in TypeScript, using styled-components and a custom hook.
useDarkMode.tsx
import { useState } from 'react';
export const useDarkMode = () => {
const [theme, setTheme] =…

Webfer
- 152
- 2
- 8
1
vote
1 answer
...otherProps in func React with TypeScript
I have this part of code:
And part with disabled and className have a mistake:
Property "disabled" doesn't exist in type…

AVT
- 47
- 3
1
vote
1 answer
Type '{ children element[];}' has no properties in common with type 'IntrinsicAttributes'
I'm trying to create routes to my React application but i'm having problems with this error in my tsx file called "Routes":
"Type '{ children element[];}' has no properties in common with type 'IntrinsicAttributes'.".
In this file i'm importing the…

Davi Farias
- 11
- 3
0
votes
3 answers
Type '{}' has no properties in common with type 'IntrinsicAttributes'
I create a dynamic button (Comp) in React TypeScript. "Comp" can be a button, anchor, or Link (React Router). I got a problem with the type having no properties in common with the type 'IntrinsicAttributes'.
type ButtonProps = {
href?: string;
…

Huy Pham
- 17
- 4
0
votes
1 answer
Property 'Post' does not exist on type 'IntrinsicAttributes'. or not assignable to type 'IntrinsicAttributes'
import Head from 'next/head';
import { PostCard, Categories, PostWidget } from '../components'
const posts = [
{
title: "React Testing",
excerpt: "Learn React Testing"
},
{
title: "React with Tailwind",
excerpt: "Learn React with…

Divyanshu Rawat
- 1
- 1
0
votes
0 answers
Type {} is not assignable to type 'IntrinsicAttributes & {}' using styled
I have this component:
const FilterTypeSelect = styled(FormSelect)`
width: 150px;
`;
where FormSelect is another component.
whenever I use the component like below:
…
0
votes
1 answer
Type X is not assignable to type 'IntrinsicAttributes & Y'
The type of the array of objects looks as follows: MyType: { name: string, age: number }[], props type in component is the same
./Parent.jsx
export const Parent = () => {
return (
)
}
./Content.jsx
export const…

Lust
- 188
- 1
- 1
- 8
0
votes
0 answers
IntrinsicAttributes : Type Error with a type = ComponentType, [TS2322] TypeScript
This is my second question here so be indulgent please :).
Context : Got one Component who receive as props this , focus on resultType:
type Props = {
//Array of an Interface populate by an import json on parent
arraySource: Array<{}>,
…

Mazout Mazout
- 13
- 3
0
votes
1 answer
not assignable to type 'IntrinsicAttributes & ContentOutlineProps & ContentBrainstormProps' for dynamically rendered component
I have this page with a component which dynamically renders different component using setActivePage hook. However, I am getting the following typescript error on the indicated line:
const Content: (({ question_blocks, }:…

Tyler Kim
- 181
- 1
- 11
0
votes
1 answer
Is there any better way to IntrinsicAttributes & TYPE in Typescript
This code is works good.
;
interface auctionType {
auction: randomAuctionType;
}
const AuctionCardGenerator = ({ auction }: auctionType) => {
...
}
and randomAuctionType is looks this.
interface…

김일혁
- 349
- 1
- 3
- 9
0
votes
1 answer
React property XXX is missing in type 'YYY' but required in type 'ZZZ'
import { Link } from "react-router-dom";
export interface AvatarSize {
avatarSize: number;
}
export interface PageInterface extends AvatarSize {
user: {
permaLink: string;
};
}
const data = {
user: {
permaLink:
…

Ryan Kim
- 101
- 4