Category "reactjs"

TypeError: Cannot read properties of undefined (reading 'map') while setting up MetaMask to display NFT

I keep getting this error when I run my code Uncaught TypeError: Cannot read properties of undefined (reading 'map') I am tring to set up a Metamask which displ

Rerender a row from Datagrid without refresh the whole list

In a List with DataGrid, in each row I have a button for change status, on button click I show a modal with a form, after submit, in the response I have updated

Cannot read properties of undefined (reading 'map') at NFTContainer for nft collection

So im making a function in react that enables me to connect my react page with my metamask and display my nfts that ive purchaed on opensea onto my webpage once

How to render react components by using map and join?

I have one component which is going to display Array of String. The code looks like this: React.createClass({ render() { <div> this.props.d

Yup / Formik validation using dynamic keys

I am trying to validate a form with a dynamic amount of fields - i.e., data is returned from an API that determines how many rows are shown, and for each row th

'clarinet integrate' quickly fails and nothing is logged to console?

Following https://docs.hiro.so/smart-contracts/devnet I can't get the command clarinet integrate to work. I have installed Docker on my mac and am running versi

React 18 useId cannot be in key

The error: React Hook "useId" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function. So,

React render array of components

Quick question. Anyone know how to render an array of components? Trying to make it easier for a developer to alter a particular component. (It's like a dashboa

Ascii/HTML character code doesn't work within React variable

I have the ascii/html code of a checkmark: ✔ &#10004; In react if I go: <div>&#10004;</div> then it works. but if I go var str

Using multiple context in a class component

How can I use multiple Contexes in a React Class Component? Like how you can use multiple contexes in functional components like calling useContext twice or mor

Passing data child to parent functional components in reactjs

How do you pass data from child functional component to a parent functional component in react. I want the vehicle.drive data which is being passed from the par

Invalid Token Error: Invalid token specified: Cannot read property 'replace' of undefined?

I was trying to decode token created through jwt, so that I can access values in my react page and and use it.But for some reason it shows "InvalidTokenError: I

I can't fix error while importing web3 in React

I only want to import web3 in react, but always I see errors like below (7 errors!). I've installed the 'crypto-browserify', 'stream-http', 'https-browserify',

react-dom installed, but not found. `Could not find module in path: 'react-dom/client' relative to`

Here is the Codesandbox I want to run a rest, but the Tests tab shows this error. Could not find module in path: 'react-dom/client' relative to '/node_modules/@

antd Table Summary

I have an antd table where I want to summarize columns in the footer. However, I'm having issues getting them to line up properly with my columns. I've tried t

How to adjust font size to fit view in React Native for Android?

How I can make the font size of the text auto change inside a view in react native? I have text with different lengths, some of which doesn't fit the view so d

Attempted import error: 'Wallet' is not exported from '@project-serum/anchor'

Trying to import the Wallet class but getting error in title at runtime. This issue apparently should have been fixed in v0.21+ but it doesn't appear to work in

Unsubscribe from watchPositionAsync with useEffect return function

Using react native with expo-location for a mobile app, I would like to unsubscribe from Location.watchPositionAsync which returns a promise with a remove() met

'react-scripts' is not recognized as an internal or external command

I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like mavenapp/src/main/javascript/[npm

Getting "Unreachable code no-unreachable" in ReactJS

I am new to create GET requests in React. I am trying to fetch media_id from Instagram Content when someone enters the url in the input field. The interesting t