Issue Using Nextjs and I’ve created an index.js in the /pages directory and created meta.js in the /components/meta/ directory. As my app rebuilds I get the following error: Element type is invalid: expected a string (for built-in components) or a
Continue readingTag: next.js
TypeError: Cannot set properties of undefined (setting 'styles') + Using withLess/withSass/withCSS in next.config.js NextJS
Issue I am trying to configure a NextJS 12 project with custom Ant Design and according to some examples that I have found, I must configure my next.config.js file with the libraries @zeit/next-sass / @zeit/next-less / @zeit/next-css but when I
Continue readingHow to conditionally render label to avoid labels overlapping in recharts?
Issue I’m having an issue similar to this using Recharts library with NextJS. I’m using a ComposedChart that renders Bar and Line components. However, the Labels are overlapping on each other if the value is not big enough between them.
Continue readingnextjs how to write css variable in components module.css like global css?
Issue In our global css file we can write css like this :root{ –orange:#e67e22; –black:#333; –light-color:#777; –border:.1rem solid rgba(0,0,0,.2); –box-shadow:0 .5rem 1rem rgba(0,0,0,.1); } *{ margin:0; padding:0; box-sizing: border-box; outline: none; border:none; text-decoration: none; font-family: Verdana, Geneva, Tahoma, sans-serif; font-weight:
Continue readingtailwind dark mode isn't extending fully when scrolling all the way on page
Issue using dark mode in a nextjs web app with tailwind, when scrolling, if you scroll past the scroll container (almost like your bouncing off the bottom or top of the page when scrolling), the dark mode isn’t extending all
Continue readingInternal API fetch with getServerSideProps? (Next.js)
Issue I’m new to Next.js and I’m trying to understand the suggested structure and dealing with data between pages or components. For instance, inside my page home.js, I fetch an internal API called /api/user.js which returns some user data from
Continue readingTailwindCSS Active Link Text Color Not Changing
Issue I am using NextJS and Tailwind css to desig a top navigation bar. I want the text color to change for active link. Below is my code: const Header = () => { return( <header> <nav className=”sd:max-w-6xl mx-auto”> <ul
Continue readingWhat TypeScript type should NextJS _app.tsx Component and pageProps be?
Issue Here’s the default _app.tsx from NextJS: function MyApp({ Component, pageProps }) { return ( <Component {…pageProps} /> ) } The problem is, as soon as you switch to TypeScript, you get a warning under ES6Lint that these types are
Continue readingHow to set port for Next js on PM2
Issue i have an ordinary next js application with the following scripts in my package.json file. "scripts": { "dev": "next dev", "build": "next build", "start": "next start -p 3002" }, I have a start script with the -p tag to
Continue readingHow would I go on changing the style when a different rarity is chosen. (Next.JS)
Issue How would I go on changing the style when a different rarity is chosen. I’m making a game which chooses a random rarity for you when the website is loaded, and I want to set the color of the
Continue readingfailed to load next.config.js when building using github action
Issue I am using simple ssh deploy action and i have a bash script to build and restart pm2 frontend process. It’s working fine when I run it directly run the script through the ec2 instance but gives error when
Continue readingAdd blur effect to navigation scroll bar
Issue I am trying to implement a navbar that has a blur effect when scrolling. This works, but when I refresh the page, the scrollbar stays in the same position and I don’t get any result from window.pageYOffset. The result
Continue readingApollo Client useQuery making un-necessary refetches upon Next.js router.push
Issue I’m dealing with an issue in which a query inside a useQuery Apollo Client hook is getting un-necessarily re-run whenever Next.js’s router.push (docs here) is called. The abbreviated code is: const Parent = () => { useQuery(QUERY_HERE, { onCompleted:
Continue readingNext.js : router.push not refreshing the page
Issue I’m building a next.js page /page/data/[dataId] (this page is navigated when A user clicks on a link from page /page/data , I fetch the list of items through an API ). When user clicks on a button , I
Continue readingTypescript function becoming undefined
Issue The function binOp runs once when run from expression and then becomes undefined when it is called by term and I just can’t figure out why it is happening. sorry for the amount of code but I don’t know
Continue readingVercel NodeJS server goes to sleep with schedule job scheduled
Issue I’m running a schedule job on button click from my frontend App sent to Nextjs (NodeJS) backend /api/ function which doesn’t get triggered upon sending another request… Does anyone have an idea how could I persist NodeJS server to
Continue readingHow do i refer the className when having a nested scss ? nextjs reactjs
Issue I have a navbar with a hamburger button and i want to change the style (the bar color and the hamburger button style) on tap. I mention that i’ve tried using &:active, &.activeBar on the scss file. For some
Continue readingIssue with :global() css-module selectors not being pure in NextJS
Issue So I’m migrating an app from CRA to NextJS and I have encountered an error for the .module.scss files of some components and pages: Syntax error: Selector ":global(.label-primary)" is not pure (pure selectors must contain at least one local
Continue readinghow to only get child route back on next js?
Issue Not sure this title is worded right. Next JS project and am making a custom breadcrumb component. everything i need looks good so far except i have a /people page then /people/roles page. i am trying to get a
Continue readingNext.JS: Cannot find module '@emotion/react'
Issue I’ve been using Next.JS to make a test project to learn the framework. So far so good until I decided to use MUI to create a table so using npm I installed @mui/material @emotion/react and @emotion/styled but when it
Continue readingHow to type a page component with props in Next.js?
Issue I’m looking to correctly annotate the Home function component’s parameters, but am running into a little bit of trouble. I was hoping to annotate it like: { events }: { events: Event[] }, but am getting the TypeScript error,
Continue readingHeroku Shopify Application Error 'npm ERR! ERESOLVE unable to resolve dependency tree'
Issue Greetings I have a problem with Heroku because it’s don’t want to install legacy packages for my Shopify app, my Shopify app is on Github and I just set up everything that my application needs, but when I deploy
Continue readingHow can I specify child styles with next.js?
Issue I have: import styles from ‘./Editor.module.css’ … <ReactQuill theme="bubble" value={documentState.content} onChange={handleChange} modules={modules} formats={formats} onKeyDown={handleKeyDown} className={styles.quill} /> Where Editor.module.css is: .quill { height: 100%; flex-grow: 1; padding: 0; position: relative; } .quill .ql-container { position: absolute !important; } So the
Continue readingHow to use NextJS Component level CSS
Issue I’m not very good at CSS, in fact, I barely write CSS due to the rise of libraries like MUI. I have found myself in a weird situation, I’m trying to rewrite this sample Emabla caurousel in typescript and
Continue readingCan you modify NextJS mount element or add classes to __next div?
Issue Long story short is I’m working on a project where I want to have the content "fill" the vertical space below the static header. I’ve done this in React with tailwind like this: <body class="flex flex-col h-screen text-gray-600 work-sans
Continue readingHow to define TypeScript interface for the passed object in props?
Issue Could I get some help please with the definition of an interface for the IconArr.primary property. I am trying to pass it into PrimarySkills components –> where I have to define interface but without any luck so far. I
Continue readingnext build `pages/404` can not have getInitialProps/getServerSideProps but I do not have getInitialProps or getServerSideProps
Issue I’ve tried searching around but can’t find anyone with my issue. When I run next build I get an error saying I cannot have getInitalProps/getServerSideProps but nowhere inside of my 404.tsx file do I use getInitalProps or getServerSideProps. Error
Continue readingTypeScript, Library:React-Time-Ago thinks it requires a number, I'm giving it a string. I cant figure out how to make it accept a number?
Issue import ReactTimeAgo from "react-time-ago" <ReactTimeAgo date = {tweet._createdAt} /> _createdAt outputs time as 2022-06-02T01:16:40Z I’m using React-time-ago to change it into like 21 minutes ago. It actually works fine. Yet, TypeScript complains staying that date parameter needs to come
Continue readingCan't pass request body through next-http-proxy-middleware
Issue I’ve been trying to create a frontend using nextjs for a backend I have running in Java. I’m using the npm package next-http-proxy-middleware and it seems that either my request body is being dropped or I’m using the package
Continue readingReact auto scroll to bottom of a div
Issue So currently I have this issue, I am in react I want when the page load, it auto scrolls to the bottom of the messages box This is my current code : https://sourceb.in/GU4IOYtB9H Solution import React, { useEffect, useRef
Continue readingHow to choose what css file to be imported using next.js?
Issue I’m now trying to choose which css file to apply using next.js. I have two css files, one for pc, and one for mobile. Currently, I am importing css file like below: // _app.tsx import "../styles/globals.css"; // pc styling
Continue readingNested Links & Buttons In A Card With Link NextJs
Issue I ‘ve searched a lot on S.O. but I could not find any answer that works 100%. My problem is that I have a card component in a NextJs application that is wrapped around a <Link> tag. I also
Continue readingCheckbox form on Next.js and Typescript project
Issue I am working on a projet with Next.js and Typescript. I have a form and it is the first time working with Typescript and the checkbox type. I am having issues trying to get all the values of the
Continue readinghow to make a Next.js "Link" 's "href" property optional
Issue I’ve made the Next.js Link as a custom React function with typescript since the "href" property is required for "Link" to be able to call it anywhere I want . so I couldn’t used it as a button which
Continue readingHow can I save logged users email in react
Issue I have this login API. i wan’t to save logged users email in state or something else. so I can show it on header after the login. user email is in the data.email . login.tsx const LoginAuth = async
Continue readingBinding element 'posts' implicitly has an 'any' type
Issue I have this code I’m writing that involves graphql, react and typescript. Halfway in and I’m getting the error message Binding element ‘posts’ implicitly has an ‘any’ type. I have no idea what this means and need help. Below
Continue readingTypeScript changing type definition of a function after importing it to another file
Issue I have a custom hook called useDropdownSelection. It’s fairly simple. Here’s the code: import { useState } from ‘react’ export const useDropdownSelection = (initialValue: string) => { const [selectedOption, setSelectedOption] = useState<string>(initialValue) const handleClick = (event: React.MouseEvent<HTMLLIElement>) => {
Continue readingNextJS Image url not changing in different endpoints
Issue So currently I have an issue where I have a Channel Tab where it displays the channel icon and name. Now the problem is, every time I change channels the icon stays the same as the first channel I
Continue readingGetting Uncaught TypeError: Cannot set properties of null while using useRef
Issue I’m building an app that needs to access the user’s device camera and display the video on the screen. I’m doing it by using a video HTML Object and assigning the media stream as its srcObject, and it is
Continue readingnodemailer && mailtrap -> connect ETIMEDOUT error
Issue I’m Working on a Dummy Project in nextjs and trying to send a reset password message to the user email using mailtrap and nodemailer but i have a problem I can’t find any solution for it when I send
Continue readingCreate a NodeJS KeyObject from a string
Issue How do I create a NodeJS Crypto KeyObject from the randomish string in my .env file? I was using jsonwebtoken to create/verify JWTs, but it can’t run in nextjs middleware edge functions, so I want to migrate to using
Continue readingHow to pass JWT token from Headers Set-Cookie to Authorization Headers in Strapi
Issue [details="System Information"] Strapi Version: 4.1** Operating System: Windows 11 Database: Postgress Node Version: NPM Version: Yarn Version: [/details] I wanted roles of users so I modified the response by adding extensions/strapi-server.js // path: src/extensions/users-permissions/strapi-server.js module.exports = (plugin) => {
Continue readingNextJS next-auth get session always null
Issue Can’t get the session data using getSession({req}) on a api call? useSession() on a component is working fine. package versions: nextjs@12.01, next-auth@4.3.1 issue: api/lists.ts: import prisma from "../../../lib/prisma"; import { getSession } from "next-auth/react" export default async (req: NextApiRequest,
Continue readingIs there a way to change tailwind default style option?
Issue I’m building a blog in NextJS. Apparently in Tailwind’s list style type the default style is list-none. So every <ul> <li> elements in my app is not styled at all. I use remark to process .md files and my
Continue reading500: Internal Server Error with Next Js in some routes
Issue Live Demo After deploying a project written in Next JS to Vercel, some page paths, such as (xxx.vercel.app/first or / second) pages, display "500: Internal Server Error". All Page Routes do not receive any errors except these two Routes.
Continue readingNext.js adding a css class to Link
Issue How does one add a css class to a Link component in Next.js? <Link className="app-subnav__link" href="/globalSettings" > Settings overview </Link> It doesn’t like the above! ES Link is throwing an error: Solution Try this: <Link href="/globalSettings"> <a className="app-subnav__link">Settings Overview</a>
Continue readingUnable to run NextJS with npm run build
Issue I recently deployed a react static app on my digitalocean server. All I did was show the root directory of the build file in the Nginx config file. And it’s running well. Now I am trying to host a
Continue readingClose Button on Modal disappear in real iphone
Issue The Close Button still appear when I test responsive in Chrome but it disappear in real iphone. When click into image, the image gallery will appear but in iphone, it just have previous button and next button, the close
Continue readingAxios & Typescript: Return array object with only the props specified
Issue I’m trying to build an API that fetches the ERC20 tokens in my balance. For this, I’m using nextjs & axios with TypeScript. The issue I have is that the response outputed by my endpoint returns way too much
Continue readingGetting error Argument of type is not 'X' is not assignable to parameter of type 'X' in the NextApiResponse in NextJS
Issue I have the following code type Data = { id: string; name: string; description: string; price: number; }; const FetchMeals = async (req: NextApiRequest, res: NextApiResponse<Data>) => { const response = await fetch( "https://url.com/Meals.json" ); if (!response.ok) { throw
Continue readingHow to serve Next.js SSG files with Express.js
Issue When doing next export, a folder called build will be generated. Currently I want to serve these static files using Express.js, here is the code: app.use(‘/’, express.static(path.join(__dirname, ‘build’))); app.get(‘*’, (req, res) => { console.log(req.path); res.sendFile(path.resolve(__dirname, ‘build’, ‘index.html’)); }); app.listen(PORT,
Continue readingReact – Material UI grid items center issue
Issue I am unable to center the elements group using material ui grid system. Issue: The margin space on the exteme right. Code: const renderProjects = projects.map(project => ( <Grid item xs={12} sm={6} m={3} lg={3} key={project.title}> <ProjectCard title={project.title} description={project.description} image={project.image}
Continue readingOauth error invalid_request: The redirect_uri is not whitelisted
Issue I’m trying to develop an app with React and Node based on this documentation: I followed the tutorial step by step but I’m stuck in testing the app with this URL format: I replaced the ngrok address and my
Continue readingHow to display a fixed navbar in Nextjs?
Issue I have a Nextjs app that displays the same navbar on each page. The navbar has a fixed position. The display is correct on the homepage (written in index.tsx). But when I click on a new page, the new
Continue readingDestructuring object in array on next js backend
Issue How can I resolve this? I put req.query parameter with an array but I can’t destructure or use items from my array. I getting on my next.js API backend just [object Object] or undefined. How can I select what
Continue readingSelector ":root" is not pure (pure selectors must contain at least one local class or id) – NextJS with SASS modules
Issue I’ve recently been switching to using modules in my next.js project, but I keep receiving this error in my newly created .module.scss files: "Selector ":root" is not pure (pure selectors must contain at least one local class or id)".
Continue readingnextjs getStaticProps not working in my component
Issue I have the following component which I then import and use in a page. Unfortunately I am getting the error error – TypeError: Cannot read property ‘labels’ of undefined and data and options are underlined in the line where
Continue readingAn argument for 'body' was not provided for send() \ json() in Next.js's API, with TypeScript
Issue I’m using an API route in Next.js. In the ‘api’ folder, my ‘file.tsx’ contain the following: import type { NextApiRequest, NextApiResponse } from "next"; const someFunction = (req: NextApiRequest, res: NextApiResponse<data>) => { the rest of the code… }
Continue readingHow to fix NextJS webpack error: You may need an appropriate loader to handle this file type, currently no loaders are configured
Issue I generated NextJS project using TypeScript template and I want to add my Storybook to the project. Storybook is written in TypeScript. When I’m adding Storybook to my NextJS project I’m getting such webpack error: "You may need an
Continue readingHow do I get my Next.js app to start in an Azure App Service running ubuntu-latest?
Issue I am trying to deploy my Next.js (SSR) on Azure. I have a build pipeline that publishes the entire root folder (not just .next folder as for static apps) trigger: – main pool: vmImage: "ubuntu-latest" # Set variables variables:
Continue readingNextJs Mongodb NodeJs | best way to filter products by category
Issue I’m new to the MERN Stack and I’m building my first project but I’m stuck on finding a way to filter products by category I was thinking of adding a "Category" field for each item in MongoDB but I
Continue readingAPI resolved without sending a response for /api/users/create, this may result in stalled requests. NEXTJS
Issue I created an API endpoint to handle user account creation in my Next.js app, and I am using knex.js to handle my queries, but I still get this error: API resolved without sending a response for /api/users/create, this may
Continue readingNextjs Routes are not working when deployed to Azure App Service Linux Instance
Issue I wanted to deploy a nextjs app to Azure App Service with Linux instance. I followed the instructions here: https://developinjay.com/deploying-nextjs-app-to-azure-app-service-linux-77a43353e761 The app is live here https://interviewramp.azurewebsites.net and https://interviewramp.herokuapp.com. Routes work in Heroku. So if user goes here https://interviewramp.herokuapp.com/books/interviewramp/introduction it
Continue readingNot able to access the animate.css's animation keyframe names from scss file
Issue I’m trying to use animate.css with React/Next.js. I can create animations using animate.css’s inline class names, but I want to call animate.css’s keyframe animations from my scss file. I was following a youtube guide and he was able to
Continue readingCan I run an npm package without the npm run command?
Issue I would like to run the next.js build process directly from the command line without going over the package.json. Is it possible to run it without npm run? Instead of running npm run build I would like to run
Continue readingHow to use custom fonts on a Next.js app under a sub-path of a domain?
Issue I have a Next.js app deployed under a sub-path of a domain (e.g. example.com/my-next-js-app). For the bundle scripts and styles, I was able to resolve them using Next.js config: const isProd = process.env.NODE_ENV === ‘production’; module.exports = { basePath:
Continue readingNextJs how to deal with fetching and a loop
Issue I have a question how can I deal with fetching through loop in getStaticProps, because when I do that the array is empty. It is caused by asynchronous code. If I pass ID array and put logic into react
Continue readingReact-tooltip and Next.js SSR issue
Issue I use the react-tooltip library in my Next.js app. I noticed that every time I refresh a website while visiting a page that uses the tooltip I get an error: react-dom.development.js:88 Warning: Prop `dangerouslySetInnerHTML` did not match. CSS classes
Continue reading`throw new Error('Failed to load static props')` when setting `fallback: true` in `getStaticPaths` in Next.JS
Issue Refer to discussion here. I faced similar error. Everything worked fine when fallback is set to false. However, when fallback is set to true, next js throws error throw new Error(‘Failed to load static props’) Solution After lot of
Continue readingHow to get the current Viewable elements in a page using javascript?
Issue I’m making a nextjs app , I want to change the navbar active button according the the visible sections in the viewport the page children look like this <div id="section1" > </div> <div id="section2" > </div> … <div id="faq"
Continue readingTailwindcss v3 not working with next.js v12
Issue tailwindcss styles are not getting applied. What might be the issue? Tried multiple solutions in the tailwind.config.js file, but none of it worked. package.json : { "name": "twitter-clone", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next
Continue readingReact/Next.js docker build failing when trying to reach out to local API endpoint
Issue I cannot seem to get my node:alpine Docker image for a react/next.js to build. I can get it to build fine locally, but I never see the traffic in my API logs when the Docker build reaches out to
Continue readingDocker Hostnames not resolving in next.js prod but working in dev mode (Error: getaddrinfo ENOTFOUND)
Issue I’m running a next.js react app in a docker container. It’s being composed with several other contains: one running Ghost (I’m using the API), one running mysql, and one running NGINX. I’ve got everything running in development mode. It
Continue readingError while reloading nextjs server while using mongoose
Issue I am using NextJS as my framework along with Mongoose. I have seen a few tutorials to implement caching for Mongoose but everytime I make some changes in my code while the NextJS server is running, I get this
Continue readingtsc: not found at heroku when I upload the React+next js and node project
Issue I have react+next and node js project and I want to deploy that project at heroku. That is the structure of my project:- and my package.json file is if I add "Start": "next start" only the frontend works and
Continue readingCannot find module 'next' or its corresponding type declarations
Issue Getting Cannot find module ” or its corresponding type declarations. when importing in Next.js project. This happens on every single import. Preview Yarn version : 3.1.0-rc.2 Next version: 11.1.2 tsconfig.json: { "compilerOptions": { "target": "es6", "lib": [ "dom", "dom.iterable",
Continue readinghow can I use top level "await" in typescript next.js
Issue When I use "await" on top-level like this: const LuckyDrawInstance=await new web3.eth.Contract(abi) I got a warning on the terminal: "set experiments.topLevelAwait true". When I tried to add this to "tsconfig.json", it still does not work. it says "experiments" property
Continue readingHow can I set a flash variable in Next.js before a redirect?
Issue Laravel in PHP made this easy with https://laravel.com/docs/9.x/session#flash-data, so I figured Next.js would have an easy way too. I thought I’d be able to do something like: export const getServerSideProps: GetServerSideProps = async (ctx) => { const session =
Continue readingPrisma Issue of managing instances of Prisma Client actively running
Issue I’m new to Prisma and Nodejs I accidentally created lots of instances of Prisma Client that keep displaying the warning of warn(prisma-client) There are already 10 instances of Prisma Client actively running. Even I tried to delete old files
Continue readingnextjs global css header element doesn't apply to a parsed markdown, replaced by tailwindcss instead
Issue I tried to parse markdown into html. the markdown does parsed as expected, the problem is it doesn’t render to what I expected. I expected the header to be automatically bolded and have bigger font size, but it doesn’t.
Continue readingNextJS props shown warning
Issue I’ve just started to learn Next, have some question. When I’m trying to send props from parent to child and I’m receiveng some error: Type ‘({ name }: { name: any; }) => JSX.Element’ is not assignable to type
Continue readingRegistration notification over email in Node.js
Issue I made an app (nextJS) that requires the user to register. The user opens the registration page and then enters username(email address) and password. When they click on the submit button this data is stored in a database and
Continue readingProperty X does not exist on type 'GetServerSidePropsContext<ParsedUrlQuery, PreviewData>'
Issue I have the following: type Session = { bearer: string, firstName: string, lastName: string, etc… }; interface ServerContext extends GetServerSidePropsContext { session: Session, }; export type ServerProps<P extends { [key: string]: any } = { [key: string]: any }>
Continue readingNextAuth: Multiple users for one account
Issue I was wondering if there was any way to have multiple users for one account provider. In this case, have a session which has a field to precise the active user (the one on which you’re logged) and be
Continue readingWarning: Prop `id` did not match. Server: "fc-dom-171" Client: "fc-dom-2" when using FullCalendar in Next.js
Issue Context I’m using FullCalendar v5.11.0, NextJS v12.0.7, React v17.0.2 and Typescript v4.3.5. I wanted to create a simple calendar, based on FullCalendar documentation, so I’ve created a Calendar component that is containing this code: import FullCalendar from ‘@fullcalendar/react’; import
Continue readingHow to create a next.js app directly in the current folder
Issue How I can create next-app in the current folder? I tried: npx create-next-app@latest . –ts –use-npm But I get error: Could not create a project called "folderName" because of npm naming restrictions: * name can no longer contain capital
Continue readingNext.JS Image `layout='fill'` is broken
Issue When using the Next.js image component, the docs claim that: "When fill, the image will stretch both width and height to the dimensions of the parent element, usually paired with object-fit." However, this is not what’s happening. What it
Continue readingusing req.params vs req.query in Next.js dynamic api routes
Issue I am trying to access params in my Next.js API routes. I am just wondering why in order to access a certain dynamic route id I must use req.query when normally in express I would access the id via
Continue readingAuth0 Endpoint "api/auth/me" returns a 404 Error in Next.js App
Issue I have gone through the following tutorial to get my Next.js App integrated with Auth0. I am able to log in and log out just fine but when trying to display user information on the page after login, the
Continue readingNext.js Global CSS cannot be imported from files other than your Custom <App>
Issue My React App was working fine, using global CSS also. I ran npm i next-images, added an image, edited the next.config.js, ran npm run dev, and now I’m getting this message Global CSS cannot be imported from files other
Continue readingHow to use layout responsive with Nextjs and tailwind?
Issue I am trying to create a card with image on the left and the card content on the right using flex in NEXTJS and Tailwind CSS. So, I am trying to have that image to be responsive. <div className="block">
Continue readingFill parent container and reduce image resolution with next/image
Issue I’m trying to fill a fixed-size container with an image. layout="fill" works like a charm, but even though container is only 125×125, the original image gets downloaded that has a resolution much higher than that and hence weights much
Continue readingScroll into a div that is hidden initially in react
Issue Im building a web chat app in next.js and i have a emoji picker button that when its clicked the menu of emojis appear.The thing is that in order to the user sees the menu of the emojis he
Continue readinghow to use value of useState after init it
Issue I these state hook: const [features, setFeatures] = useState([]) const [medicalProblem, setMedicalProblem] = useState([]) my medicalProblem variable will initial with response of a api : useEffect(() => { getMedicalProblem() }, []); const initFeatures = (index) => { let mfeatures
Continue readingHow to stop my component from being made twice in development
Issue I am following this tutorial to make a javascript calendar in react I have a working calendar UI with the following code // https://medium.com/@nitinpatel_20236/challenge-of-building-a-calendar-with-pure-javascript-a86f1303267d import { useState, useEffect, useRef, useMemo } from ‘react’ import type { NextPage } from
Continue readingNext.js api read after '#' in request.url
Issue I am trying to read a GET request url that has the query strings after a ‘#’ (out of my control) e.g: http://…onnect/endpoint/#var_name=var_value… request.url does not show anything after endpoint/ The problem can be dealt with if the endpoint
Continue readingWhy does my date variable reset in my map
Issue I am following this tutorial on making a javascript calendar and trying to implement it in react The working javascript version is in this jsfiddle import { useState, useRef, useMemo } from ‘react’ import type { NextPage } from
Continue readingType error with Redux Toolkit and Next Redux Wrapper in typescript?
Issue I am trying to get one solutions. I ask several question with the same matter in stacks. But No one answering my questions. If someone answer this, the give wrong information. Can anybody help me, please. I need really
Continue readinggetStaticPaths was added without a getStaticProps – typescript
Issue I am creating a blog using nextJS, typescript and sanity CMS. I have created the homepage where the post shows perfectly. next I am fetching the blog post details when I click the post with their individual slug. This
Continue readingFilter array that comes from backend in typescript
Issue I have ask another questions. But I get all unuse answer. I actually not getting proper solutions. Here I get an array from backend using redux. const { movies, message } = useAppSelector(state => state.movies); Here in state.movies has
Continue reading