Category "next.js"

how to get firebase use in nextJS getserversideprops

I want to get 'sample' document in Firestore using getServerSideProps if there is signed user. Code below doesn't work. It's result is 'can't read' What should

Using react redux with next.js

I try to use Redux with next.js starter project and I installed next-redux-wrapper on the project but I'm not sure where is the root file in this project. I try

Next.js: Reduce data fetching and share data between pages

I'm looking for solutions for better data fetching in a Next.js app. In this question I'm not just looking for a solution, I'm looking for multiple options so w

Adding external js script to next js

In my next project I need to add some script external js files. Like so: <script src="assets/js/productFactory.js"></script> I saw one post that

Puppeteer - custom fonts not loading in pdf but do appear in screenshots

I am trying create PDF files dynamically using the puppeteer lib but the pdf that is generated doesn't use the custom fonts (.woff) instead uses default system

Consume Cloud Run environment variables inside Nextjs app

I've recently built a Nextjs app, which I am hosting on Google Cloud Run. My app makes some requests to external APIs from the getStaticProps() method. I would

Where do I get user and pass for email form api setup?

I am trying to get this form working in Nextjs using 'React Hook Form'. So far I think everything is okay, but I need to know where to get the 'user' and 'pass'

Manipulating server side API with state value

So I built an app in React but later switched to Next.js as my api provider only accepted api calls in the server side, I had built a pagination in react very e

502 BAD GATEWAY GET / TASK TIMED OUT AFTER 10.01 SECONDS

I am using Next.js and express as front end and back end server. Next.js hosted on the Zeit Now, express app hosted on Heroku. If I go to express app, I can mak

Is not-returned code and content available for public in the source code?

I am new to nextjs and webdev. I been following a couple of tutorials but I still have a doubt. Lets say I have this page: // /pages/test/load.js import Link f

Why my nextjs component is rendering twice?

This is a component that render data from firebase storage and make it listed. What the function has to do is set the videos extracted from firebase storage to

Error: Hydration failed because the initial UI does not match what was rendered on the server with useSession() and react-bootstrap

I am using next.js, react18 and next-auth. I have a login component that checks the session and displays a login or logout link, depending on you are logged in

Generating PDF in next.js

Hii i am trying to generate PDF in next.js. I tried many libraries like react-pdf, jsPDF etc. but all they are client side library they need window to perform t

How to verify the token and get score using react-google-recaptcha-v3?

I'm using the library react-google-recaptcha-v3 in order to integrate reCAPTCHA v3 into my React application, which also uses Next. There's the following exampl

Return two values from getStaticPaths

I'm using getStaticPaths to create a product page within NextJS. I get my products from wooCommerce, problem is: I want to use "permalink" for my NextJS route U

using react router with next.js

I am learning how to use Next.js/React for my application. I am currently researching the topic of routing and I had a few questions. I know that you can use re

Next.js, using random properties without triggering "did not match on server/client" error

I'd like to randomly generate the id property of form inputs, to prevent them from potentially conflicting with other inputs with the same id. This could happen

Next.js, using random properties without triggering "did not match on server/client" error

I'd like to randomly generate the id property of form inputs, to prevent them from potentially conflicting with other inputs with the same id. This could happen

Reference error window not defined error in Web3

Here is my code: import Web3 from './web3'; if (window.ethereum) { window.web3 = new Web3(ethereum); try { // Request account access if needed

Next Auth "Credentials" redirection when throwing error on custom login page

I have a custom login page, which in turn calls the signIn() function when submitting the form. I am only using the "Credentials" provider. Server-side, I am ju