I am new at React.js
and typescript
. I tried googling for this issue but could not find any solution for this.
Sidebar.tsx
...
import Header from "./Header";
const Sidebar = (props: any) => {
return (
<aside className="sidebar">
<Header title={props.pageTitle} />
...
</aside>
);
};
export default Sidebar;
Header.tsx
const Header = (props: any) => {
return (
<header className="header">
<img src={ props.image } alt="Logo image" />
</header>
);
};
export default Header;
How can I fix this issue..?
2
Answers
Here is fixed code.
PageHeader.tsx
It is telling you the does not have the attribute title.