If you go to my Preact app on https://startupguide.vercel.app/ and click “Name Generator”, you will see only the Name Generator form (as it should be). But if you go to https://startupguide.vercel.app/namegenerator and refresh the page (to get SSR page), you see first the Name Generator form, AND the Start page underneath(!).
This is how I have set up my Preact routes:
import { Router } from 'preact-router'
import Start from './pages/Start'
import NameGenerator from './pages/NameGenerator'
const App = ({ prop }) => {
return (
<Router>
<Start path='/' />
<NameGenerator path='/namegenerator' />
<NameGenerator path='/namegenerator/:word1' />
<NameGenerator path='/namegenerator/:word1/:word2' />
</Router>
)
}
export default App
What could be the problem?