-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out our plan for RSC / SSR / SSG, also SEO #911
Comments
Hi there, any preview or update on this? |
Not yet @leoschet , we have been prioritizing some other features lately! How important is this for you, what are you needing SSR for? |
I would like it for SEO. No urgency per se. Perhaps this is a repeated question, but as I understand React natively supports server components. Can we use it with wasp? Or is this exactly what this ticket is about? |
This is kind of what this ticket is somewhat about -> investigating how we are going to approach SSR / RSC / SSG and other stuff in Wasp. It wasn't super important so far, but we will want to address it at some point! |
Note to self: while SSR is good for SEO, we can also get very good SEO without actually doing SSR, but just allowing users to set meta tags per pages. |
User asked about this here: https://discord.com/channels/686873244791210014/1219684155072184440/1219684155072184440 . |
Related to #1910 . |
We might want to look into using https://vike.dev/, seems like potentially a good solution to build upon! |
Hi |
@jswizard09 thanks for the kind words! What exactly do you mean by "custom handling of the rendering with the express server"? How would you go about that, can you share more details? What are you trying to achieve? |
Hi @Martinsos, Thanks for your team efforts in this project, it's been a fun-ride using wasp-lang to quickly develop cool apps. Similar to @jswizard09, I myself stuck on the SEO/Meta-tags per page/SSR issue which we do not support here at the moment. I was wondering if we can modify the build process which may inject our custom meta-tags for each page. I know it would require different HTML page for each wasp 'page', which may be in conflict with the current philosophy of the project. Love to know your thoughts! |
@AdnanHussainTurki thanks for the comment, that makes perfect sense! So the plan is to introduce SSR as an option, but we haven't started working on it yet -> it is among one of the things we will be looking to tackle quite soon for sure though, so likely in the next half a year. There is no way to "hack" SSR in the meantime in Wasp, in the sense that you can tell the server how to render a component server-side. What you can do in the meantime though is use something like https://github.com/staylor/react-helmet-async -> it will allow you to define in your React component, that you are using for a specific Page, how to set meta tags, so they will be picked up by the SEO, which is already a big deal. |
Maybe "React Server Components" and "RSC" should be added to the original issue description? Because it seems like the canonical way that React frameworks are moving forward in this space:
|
Yup certainly! I will update it. |
Discord discussion on how to do SEO in Wasp: https://discord.com/channels/686873244791210014/1296007418911916092/1296007418911916092 . |
Since we are using React Router 6 for our routing needs, one possible solution for us could be going with React Router 7 as our SSR solution. I've played around with it - it is not that hard to migrate to it - but there are issues with code that depends on the browser APIs when we try rendering it on the server. Specifically, the use of |
Things to explore:
NOTE: In the meantime, till we have more "official" support, to get meta tags per page, which is important for SEO, good potential solution is to use https://github.com/staylor/react-helmet-async .
EDIT: Big movement toward RSC, we should look at those in more details, see how we can support it and what it means in this whole picture.
The text was updated successfully, but these errors were encountered: