Closed IRediTOTO closed 4 years ago
ops, image above not a gif, lets see this https://i.imgur.com/CvN6m50.gifv
I found it https://www.npmjs.com/package/next-connect#methodpattern-fns But look like it will make loading slower right?
export async function getServerSideProps({ req, res }) {
const handler=nextConnect();
handler.use(middleware)
handler.use(passport.initialize())
await handler.apply(req,res)
console.log("user",req.user)
return {
props: {
user:req.user,
},
};
}
i'm using https://www.npmjs.com/package/react-loading-skeleton to create a loading screen at the moment and we try to prefetch and have a service worker in place for caching.
if I use serverSideprops we are running into deployment issues on zeit after their new limits. so we are searching for new ways to deploy next completely to aws by our own
@wortkotze You r right. I should do like that. Thanh you :)
Is your feature request related to a problem? Please describe. Let's see this image Is there anyway to make refresh page but logged in user will not see the "Hello strenger"? I mean check login from server, not fetch swr from client.