Category : server-side-rendering

Can anyone please help explain this unexpected behavior? I have a working useSessionStorage hook from https://typeofnan.dev/using-session-storage-in-react-with-hooks/ that looks like the following: import { useState, useEffect } from ‘react’; function getSessionStorageOrDefault(key, defaultValue) { if (typeof sessionStorage === ‘undefined’) { return defaultValue; } const stored = sessionStorage.getItem(key); if (!stored) { return defaultValue; } return JSON.parse(stored); } function ..

Read more

My firebase structure is: -2 Collections: chats and users -The chats Collection has: users(array) that are in the chat(one to one) and it has other collection named ‘messages’ In SSR, i’m trying to get the chat and messages after select a chat. The function is: export async function getServiceSideProps(context) { const ref = db.collection("chats").doc(context.query.id); // ..

Read more

Im trying to make an ecommerce with next and I want to do the following route: localhost:3000/category/[categoryName]/[subcategoryName] This route works: localhost:3000/category/[categoryName], but when I try with a subcategory it throw: "Error: A required parameter (category) was not provided as a string in getStaticPaths for /category/[category]/[subcategory]". Folder structure goes like this: pages/ category/ index.js [subcategory]/ index.js ..

Read more

Im trying to make an ecommerce with next and I want to do the following route: localhost:3000/category/[categoryName]/[subcategoryName] This route works: localhost:3000/category/[categoryName], but when I try with a subcategory it throw: "Error: A required parameter (category) was not provided as a string in getStaticPaths for /category/[category]/[subcategory]". Folder structure goes like this: pages/ category/ index.js [subcategory]/ index.js ..

Read more

Please help to fix this issue I am building a dynamic website for displaying live match scores and stats everything is fine. Before deploying on the server we test the performance and stress test on our staging environment. The Mobile score is 50 and the Desktop score is 80 on the performance test. Lighthouse reporting ..

Read more