Category "reactjs"

How to load script in react component

I am having following script file <script language="javascript"> document.write('<script language="javascript" src="http://tickettransaction.com/?bid

How to set a filename for downloading csv file with react-table?

I am using react-table v7, useExportData and papaparse to download a .csv from a table referencing to this codesandbox, so far it downloaded successfully but I

TypeError: Cannot convert undefined or null to object next.js

Error - TypeError: Cannot convert undefined or null to object This error happened while generating the page. Any console logs will be displayed in the terminal

Force Webpack to use ES6 syntax in react-app bundle [duplicate]

My aim would be to have ES6 syntax (or latest one) in my entire react-app built. I've already managed to avoid polyfills in my own code by omi

Reload screen after action - REACT NATIVE

I want to have a screen which contains all my favorite subjects. I have to select these from another screen, with all the subjects. The functionallity behind it

create-next-app' is not recognized as an internal or external command, operable program or batch file

I'm trying to install next app with npx create-next-app nextjs-blog and i keep getting this error; 'create-next-app' is not recognized as an internal or extern

ethers can't get pure function return value

I built a test solidity pure function to display a greeting message. It only returns a string "Hello User". Here is the contract code: //SPDX-License-Identifie

node_modules/@types/chrome/index.d.ts is not a module

I've nx monorepo having React TypeScript app. When I'm trying to use chrome in any of .ts file, VSCode is reporting a error saying Cannot find name 'chrome'. I'

Prisma Schema not updating properly after adding new fields

As the title states, I am using Prisma 2 in a Next JS app. I have a very simple schema: model User { id Int @id @default(autoincrement())

Getting this error while making a post request ( API resolved without sending a response for /api/comments, this may result in stalled requests.)

Hi i have started learning Next.js and currently unable to make a POST request on api. I have a comments folder inside the api folder. And inside the comments i

retrieve store data from react redux

I'm new to redux, I can't get data from the store.I get this message in the console: Error: Invalid hook call. Hooks can only be called inside of the body of a

Hot Reloading Page in React 17.0.2 within a container doesn't work

If I run locally run start Everything works perfectly. After executing the command docker run -p 3000:3000 -v /app/node_modules -v ${pwd}:/app b88c46febae5 I ge

(react redux toolkit) i want to know using action with multiple prameters

i recently started @reduxjs / toolkit. when i see code or documents of this, it not is not worked (undefined...) or too complicated(prepare?? createaciton??). i

React Hook - useEffect same code but severals behaviors

I'm new to React Hook and I follow severals tutorials but I'm afraid I'm not understand everything. I have two components with pretty much the same code but two

React PDF download with react-pdf not sure what I am doing wrong

I am trying to download a page in PDF format using the React-PDF package. For instance I am trying to download the User's Profile Information. I am using <P

Separate React app and Laravel 8 api, doesnt set cookie/cors

I have a standalone react app on localhost:3000 using Axios I make a request to my Laravel 8 api using sanctum. The request goes through: But the cookie doesn'

If clause in a React return statement with

So I'm making a React program that's about sports. In there I have a table that shows user inputs and those are saved in Firebase realtime database. I'm getting

Accessor keys not working with space in react-table

Table rows are not able to access the columns in response payload when they have a space in the accessor key. The column displays - on UI. const data =[ {

I am getting an error on login with Auth0 and NextJs

I have tried a serverless auth0 with NextJs/React example that is identical on 2 different sites. I am getting an error when I click login and I can't understan

How to handle components with different routes in react js

I have build an react app with 3pages Page1,Page2,Page3 and have Navbar and Sidebar component. And using react-router v6 for rendering components. I want the Na