Category "reactjs"

Issues with uninstalling create-react-app

I am running npm uninstall create-react-app, and it returns npm WARN saveError ENOENT: no such file or directory, open '/Users/me/Documents/package.json' npm W

Sharing components made with Native-Base between ReactJs and React Native Projects

I am trying to share components between a ReactJs and React Native project. I have been successful in being able to share components that use React Native, but

UseDapp - useCall - How to get return value from Solidity function?

I am still quite new with react and solidity and don't know where to start. I can update a String and want to print it out after I changed it. But I want the St

How to automatically close an open details tag when another detail is clicked with React?

The Problem I have a list of detail tags and I would like to have an opened details tag close when another one opens. I am dynamically rendering a list of detai

Background image in tailwindcss using dynamic url (React.js)

I have an image url fetched from an API and I want to display it as a background image. Is there any way I can implement this with tailwindcss or should I use s

Sending the bearer token with axios

In my react app i am using axios to perform the REST api requests. But it's unable to send the Authorization header with the request. Here is my code: tokenP

React, offsetTop,offsetLeft and getBoundingClientRect() are not working

I'm working in react and I'm creating a button with a tooltiop, but I can't place it. I mean I can't read the button's distance from the top and left. I tried

React-router : How to trigger $(document).ready()?

In my current React + React-router setup my component imports some jQuery things (owl.carousel and magnific popup) I want to keep the code clean, so the extern

react-router-bootstrap linkcontainer

How do I use react-router-bootstrap to link to another react component? Do I need to set up my routes with react-router first? I don't know how to use react-rou

React app deployment to Netlify : Module not found: Error: Can't resolve './pages/HomePage' in '/opt/build/repo/src'

How can I solve this error? I tried many approaches like using Netlify CLI, linking to git and github but nothing worked. The app works fine in development mod

error TS2307: Cannot find module 'react'

I am trying to create a component with typescript but I am getting the following error in the terminal yet I already installed react and react-dom using npm. E

setupProxy is not working - http-proxy-middleware

My react app is up on localhost:3000 and node server is running on localhost:5000. When I am trying to connect to the express API the route is going to 'localho

I am getting an error of Html Webpack Plugin in reactjs

My Application was working fine but when I installed material ui npm package my application is giving me this error. Html Webpack Plugin: Error: Child comp

Trigger useEffect in Jest and Enzyme testing

I'm using Jest and Enzyme to test a React functional component. MyComponent: export const getGroups = async () => { const data = await fetch(groupApi

Pokemon API request generate 5 Pokémon at a time

I need help with how to fetch 5 random pokemon at a time instead of rendering all pokemon on the screen using react? // destructuring const [items, setItems] =

REACT- Uncaught TypeError: Found non-callable @@iterator

In react, I have a component that takes in 2 destructured parameters. One of them is an array called points. However, when attempting to call the Math.max(...po

Multiple path names for a same component in React Router

I am using the same component for three different routes: <Router> <Route path="/home" component={Home} /> <Route path="/users" componen

React JS - Material UI ListItem (with Collapse API) onClick expands/collapse all sub list items instead of the selected one

I'm implementing Expand/Collapse feature of List using React JS - Material UI ListItem (with Collapse API) When I click on the ListItem it expands/collapse a

How to replace /n to linebreaks in react.js?

I am trying to replace every /n to a <br> tag in ReactJS. In my note.note object there is a string with multiple /n in it. example note.note: test\ntest

React.memo - why is my equality function not being called?

I have a parent component that renders a collection of children based on an array received via props. import React from 'react'; import PropTypes from 'prop-ty