Joe Pea
solid-router: navigate(-1) or navigate(path)? How do we know which?
There's a probably not uncommen scenario in routing: you navigate somewhere, then the app has a button to go back.
For example, if you're on a home page, and you click a user profile, the back button could just run
navigate(-1)
and you'll be back at the home page, one entry previous in the browser history.
But... what if you didn't start at the home page? For example, what if you copy/pasted the user profile URL into a new tab? It would no longer make sense for the back button to call navigate(-1)
because there's nothing to go back to. So in this case it would make more sense for it to call navigate('/')
, adding a new entry in the browser history.
Is there a solution to this to make it easy? What's the best behavior? Should we just always call navigate('/')
instead of navigate(-1)
and make a new history item each time?
Seems like the easy solution is to make a new history item each time, forget about navigate(-1)
.1 replies
how to make SSG use dynamic client-side routing instead of full page refresh?
I tried pre-rendering with
server.prerender.crawLinks = true
in app.config.ts
, but when I change pages, each page does a non-ideal full page refresh.
I'm guessing this means solid-start doesn't have client-side routing in SSG mode?35 replies
how to disable server output, enable *only* pre-rendering?
When I enable pre-rendering (SSG) with
server.prerender.crawLinks = true
, the npm run build
command outputs both a server and static pre-render. How do we configure it to output only SSG without the server output?3 replies
How do we configure babel proposal decorators with Solid's vite plugin?
I've got this Stackblitz:
https://stackblitz.com/edit/solidjs-templates-wyjc1i?file=index.html,src%2Findex.tsx,vite.config.ts,package.json
No luck configuring decorators like so:
Stackblitz terminal shows this error:
Ask me why I have tooling fatigue. 🙃 Buildless for the win.
7 replies