Reactjs – useSWR has infinite service call
I have a api that only uses POST, so i have to sent an ID to fetch, in this case event. The problem is that my SWR is making infinite calls. I have this component: const EventDetail = ({ params…
I have a api that only uses POST, so i have to sent an ID to fetch, in this case event. The problem is that my SWR is making infinite calls. I have this component: const EventDetail = ({ params…
I'm using Next.js for the first time and trying to build my project but I get this error and I don't know what's causing it. From what I find online people get this when calling an API or database but…
It's my loginButton which is the wrapper of Button component in another file. 'use client'; import { useRouter } from 'next/navigation'; import { useTransition } from 'react'; interface LoginButtonProps { children: React.ReactNode; mode?: 'modal' | 'redirect'; asChild?: boolean; } export…
I'm using Laravel breeze-next nextjs starter package to create a nextjs app with a backend powered by laravel and protected by sanctum. Laravel expects a csrf header value and a session cookie. I'm having no problem setting these values in…
I have a component that looks like this import { useState, useEffect, useMemo } from 'react' import Input from '~/components/Input' import Fuse from 'fuse.js' interface Props { data: any[] keys: string[] onUpdate: (data: any[]) => void placeholder: string } const…
Description I'm encountering an issue with the header component in my React based next.js web application. Upon the initial load of the page, when I first scroll, there's a noticeable jittery behavior before the header hides as intended. Once this…
Maybe the tech stack doesn't matter here, but I have a nextjs project with tailwind for styling. I'm trying to insert an image next to an h2 tag, but the image won't behave how I expect it to. There is…
I am building an app in Next.js with no server. I get a video file input using an <input> tag, after that I convert it to a blob url and save it in localStorage for cross-session use. However, after reloading…
I'm encountering an issue with resolving TypeScript path aliases in my project. I've configured the tsconfig.json file to include path aliases using the "baseUrl" and "paths" settings, but alias imports are not working as expected. I want to import it…
The is present in the pinecone.ts import { PineconeClient } from '@pinecone-database/pinecone' export const getPineconeClient = async () => { const client = new PineconeClient() await client.init({ apiKey: process.env.PINECONE_API_KEY!, environment: 'gcp-starter', }) return client } core.ts (where I want to…