Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [reactjs]

React is a JavaScript library for building user interfaces. It uses a declarative, component-based paradigm and aims to be efficient and flexible.

reactjs
0 votes
0 answers
32 views

Tic Tac Toe using React - how to color only winning buttons?

I have a Tic Tac Toe game in React that works fine, it correctly shows the winner. But if for instance, Player X is winning, it's coloring with green all the X tiles, not just the winning ones. I want ...
MirunaB's user avatar
  • 11
0 votes
1 answer
63 views

Cancel function

I have a component on the search page, and inside the component, there is a useEffect that triggers the post filtering and fetching code from the database when the search words (city, word in post, ...
Максим Дмитриевич's user avatar
0 votes
2 answers
38 views

Unable to add request-header to POST request [duplicate]

I am hitting the API by using payload and in headers giving Content-Type : 'application/json' still in browser in request headers I'm seeing Content-Type : 'text/plain' Because of that in the backend ...
Shirish's user avatar
0 votes
0 answers
12 views

How can i call the object parametr inside the object

I have some array with objects and i need to define condition of style showing which connected with one of the object attribute const location = useLocation(); const userLinks = [ { title: ...
Nick's user avatar
  • 1
0 votes
0 answers
26 views

Link from react-router-dom is not redirecting

Since the button is within a <Link /> Component it shoul redirect to the '/home' page but it is not, its not redirecting anywhere. the function PostLogin is being Called i have confirmed <...
Football Dudes's user avatar
-2 votes
0 answers
13 views

How do I host my MERN project in Hostinger? [closed]

I wants to host my MERN(React) project in Hostinger, I need to know that can I host my frontend and backend both in the hostinger cloud hosting, or do I need to buy web hosting for frontend and VPS ...
Mohammad Sakib Chowdhury's user avatar
0 votes
0 answers
12 views

@iFrame-resizer/react implementation error - Uncaught SyntaxError: Unexpected token 's', "scroll-to-top" is not valid JSON

I am using the latest version of iframe-resizer/react for automatically adjusting the height and width of the iframe. Whenever I'm reacting the content, I'm getting a runtime error stating - VM2860:1 ...
Soham Dey's user avatar
0 votes
1 answer
28 views

The input in searchbar disappears when i click on any other space/part of the browser of when i click tab button

import React, { useState, useEffect, useRef } from "react"; import { useNavigate } from "react-router-dom"; import axios from "axios"; import Autocomplete from "@mui/...
ismail sakhani's user avatar
0 votes
0 answers
26 views

TypeError: Cannot read properties of undefined (reading 'quantity')

Ecommerce site using MERN. This is the Navbar.jsx component. Error shows cant read undefined 'quantity' on line 72. ERROR MESSAGE Uncaught TypeError: Cannot read properties of undefined (reading '...
Mamik Saha's user avatar
-1 votes
0 answers
13 views

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax,

This is the error i am getting: Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such ...
user26524488's user avatar
0 votes
0 answers
8 views

Axios Post Still Blocked Even Though "Access-Control-Allow-Origin", "*" Set On server

In my backend I've set the following endpoint router.post("/sign-in", async (req, res) => { try { //Extracting email and password from the req.body object const { email, ...
CHEESE's user avatar
  • 15
0 votes
1 answer
14 views

Digital time picker in materialUI/nextjs

I want show a digital time picker or duration picker (only m,s). My project theme is in material UI, nextjs so i used materialUI config to implement this but it shows analog clock always. Below is my ...
Muhammad Abbas Khan's user avatar
-1 votes
1 answer
24 views

How to define a variable of exported type in React?

I have defined a custom structure in a separate file: //status.js export const status = [ { id:0, label:"In progress", }, { id:1, label:"...
ihateapachegroovy's user avatar
0 votes
0 answers
8 views

Lightningchart JS - Chart is not interactable

I have 5 different line charts being rendered in my React app. Below is one of the methods to create those charts. function createEcgHeartRateChart( response: any, startInterval: string, ...
Anish Arya's user avatar
0 votes
1 answer
49 views

I get the error that there is nothing available

I get the following error in the project I developed using React and Typescript. export 'useTableProps' (reexported as 'useTableProps') was not found in './useTable' (possible exports: useTable) It ...
kontrawolta's user avatar

15 30 50 per page