S
SolidJS9mo ago
Zed

Need help on how to make "Kind of multipage" in SolidJs

So, basically I am new to all these frameworks stuff and solidjs is my first framework. I want to ask how can I apply a kind of multipage in Solidjs, lemme explain - I want to make a project website for a lorem ipsum company and some about us and recruitment page. I dont know how to do so that when some button or link is clicked the page will shift to other page or something like that. Just like how we use to make links to other index.html files to show other pages in the website.
8 Replies
peerreynders
peerreynders9mo ago
If I understand your question correctly I see two main options. 1. Actual MPA: Astro + SolidJS 2. Client side routing: Use solid-router
Docs
@astrojs/solid-js
Learn how to use the @astrojs/solid-js framework integration to extend component support in your Astro project.
Zed
ZedOP9mo ago
Yeah thanks
peerreynders
peerreynders9mo ago
I want to make a project website for a lorem ipsum company and some about us and recruitment page.
Just a follow up note. What you describe would actually be better served with the Astro+solidjs solution because with solid-router (even with SSR) the javascript bundle gets bigger as the site gets bigger until such time where one has to worry about bundle splitting. Your description is more of a content site with some interactivity. Astro can generate the (content) page HTML at build time (SSG - Server Static Generation) while leaving the page navigation to the browser's native capabilities; SolidJS can be used for the more interactive bits via islands/partial hydration. All that said, it is of course your choice.
Zed
ZedOP9mo ago
are u stalking me (jk) cuz this is the second post u answered for me lmao just kidding lol ok
peerreynders
peerreynders9mo ago
I'm not that familar with Discourse. Your comment regarding closing the post made be wonder if that is what happened to this post. It's only then that I realized that you posted this as well. Sorry, for the intrusion.
Zed
ZedOP9mo ago
does its documentaion covers all the tutorial or I have to find a yt vid nah its fine
peerreynders
peerreynders9mo ago
Frankly in terms of learning you start with Astro which is actually a good way to get familiar with this web stuff. Adding SolidJS as then more of an advanced technique. If you have your sight set on just SolidJS go ahead. Its just the Ryan Carniato spends a lot of time thinking about this stuff. https://dev.to/this-is-learning/patterns-for-building-javascript-websites-in-2022-5a93
DEV Community
Patterns for Building JavaScript Websites in 2022
Deciding on the approaches and tools to use to build on web these days can be a challenging prospect....
Zed
ZedOP9mo ago
ok thanks
Want results from more Discord servers?
Add your server