route not rendering sometimes

o/ so I have two routes: the index one (home) and the /settings one. here's my root.tsx: https://pastebin.com/K8ykT5C2 here's my settings.tsx:
export default function Settings() {
return (
<main>
<h1>Settings</h1>
</main>
)
}
export default function Settings() {
return (
<main>
<h1>Settings</h1>
</main>
)
}
it renders the buttons in the root.tsx only. i have a feeling it's related to me using window.location.href = "/settings" instead of the <A href="/settings"> tag used in the template
2 Replies
Revxrsal
RevxrsalOP2y ago
there are times when it renders, but most of the time it doesnt
Revxrsal
RevxrsalOP2y ago
i solved it using https://github.com/solidjs/solid-router#usenavigation, so instead of doing window.location.href i'd just use navigate(). it renders better too
GitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - GitHub - solidjs/solid-router: A universal router for Solid inspired by Ember and React Router
Want results from more Discord servers?
Add your server