I am facing a challenge while developing my website using preact router. Every time I try to add something to the router, I encounter an error stating "Property 'path' does not exist on type 'IntrinsicAttributes'." Despite this error, the site still runs, but when I change the URL to '/shop', nothing appears on the page. shop function
import { Item } from '../../Types/types'
import './item.css'
import Navbar from '../Navbar'
export default function Items(items:Array<Item>) {
return (
<>
<Navbar />
<div className='container'>
{
items.map( item => {
return (
<div className='item'>
<div>
<h3>
{item.name}
</h3>
</div>
<div className='itemimage'>
<img src={item.picture} alt={item.name} />
</div>
<div>
<strong>{item.price}</strong>
</div>
</div>
)})
}
</div>
</>
)
}
and my router function
import Router from 'preact-router'
import {App} from '../app'
import Items from './shop/items'
export const Route = () => {
return (
<Router>
<App path='/' />
<Items path='/shop' />
</Router>
)
}
I attempted to follow a tutorial on preact router, which proved to be unsuccessful. Subsequently, in my search for a solution to this problem, I found no relevant information specific to the issue with preact-router.