Click here to Skip to main content
15,891,033 members
Everything / ReactJS

ReactJS

ReactJS

Great Reads

by Valerii Tereshchenko
Comparison of different ways of handling side effects in React
by Modesty Zhang
A simplified approach to enable an array of reducers in a React/Redux web application with existing reducers and selector pattern.
by Rahul Sabharwal
This article details the migration steps from Webpack 3 to Webpack 4.
by Modesty Zhang
A practical example of utilizing Reactive Extensions RxJS for autonomous states in React components with greater expressiveness and concise code.

Latest Articles

by Fred Song (Melbourne)
A responsive React frontend interacts in real-time with a .NET 8 Minimal API backend to dynamically display and manage state transitions for a simulated traffic light system.
by Akram El Assas
Car Rental Platform with a mobile app
by Akram El Assas
Rental Property Management Platform with a Mobile App
by Akram El Assas
Open Source eCommerce Platform on Next.js

All Articles

Sort by Updated

ReactJS 

2 Feb 2023 by #realJSOP
I'm using MaterialTable, and I want to add some functionality. This new functionality does not necessarily override default functionality. How can I do that? What I have tried: This is one of the few things I can't find anything about on Google.
7 Dec 2022 by 007 007
These are the errors I've been getting: WARNING in [eslint] src\Header.js Line 19:22: 'dispatch' is assigned a value but never used no-unused-vars src\LogIn.js Line 10:10: 'state' is assigned a value but never used no-unused-vars...
20 Dec 2022 by 007 007
So, I'm able to create an account and to successfully get to the MyAccount page, see who's currently logged in to MyAccount page and log out of the MyAccount page (MyAccount.js). However, when I try to log in using an email + password by pressing...
7 Jan 2023 by 007 007
The application is working perfectly, and the Navbar behaves as expected. However, I don't know why the spacing between my components got suddenly messed up. - App.css doesn't contain anything/doesn't have any code Here's my Index.js: ...
15 Dec 2021 by aditya kamath 2021
Hi. i want to filter and search using jobnames in the dropdown using functional componenet. please help import React, { useEffect, useState } from 'react' import JobService from '../Service/JobService' import { ...
18 Jul 2017 by adwankar
ExtReact gives you the most complete set of components for your React apps in a single, commercially supported, and professionally maintained package. Let’s take a look at what’s inside.
26 Aug 2019 by Afzaal Ahmad Zeeshan
This kind of problems arise normally in React, nothing to worry about. I have modified your code a bit, and ran in my own environment and it works just fine. Here are a few of the suggestions I want to make in order to correct your React code. First of all, JSX needs to be wrapped in small...
28 Aug 2019 by Afzaal Ahmad Zeeshan
Quote: file editing is done using a shared folder on server. but which is a security risk. It will be a security risk as long your users can edit the files anonymously. You must try requiring them to login before they can access the resources and suddenly this will be a beautiful feature in your...
13 Dec 2019 by Afzaal Ahmad Zeeshan
Quote: I’ve installed the npm install --save react-audio-player but it doesn’t work. It would not work on its own. You have to configure the project to run properly, and also make sure that you are using the valid file types. This package react-audio-player uses the native tag to...
25 Jan 2023 by Afzaal Ahmad Zeeshan
Quote: its returning my react index.html file That happens when your server is unable to route the request to the proper router to handle it, and provide a response. If you can debug your server (if you are developing it at the same time!) you...
11 Apr 2023 by Afzaal Ahmad Zeeshan
That is a plain string, so React will render it on the DOM as it is. You can render the hyperlink inside a paragraph. Use this: const ExpiredMesaage = Your session has expired. Please login again via
2 Jun 2021 by Agam Sahu
How can I compare two JSON objects and return new JSON object with only the changes and if there is empty data in the OldData in a key then it will show the data of newData see the example below: OldData: { ...
10 Feb 2021 by aharris1012
I have a js file with some data with x and y-axis, for a chart. I need to display this data using react Plotly as hooks to my function. How can I accomplish this? What I have tried: Here is my code so far: data.js: export const ScatterData =...
12 Nov 2021 by ahilang37
// This is an empty Array without any objects/ values in it. let arr2 = []; console.log(arr2); // [] console.log(arr2[0]); // undefined // Solution1: pushing the value to the array one by one arr2.push(1); console.log(arr2); //...
21 Apr 2022 by Ahmed Sereta
I'm working on a form in React and I'm having some trouble. Basically I want to do some calculation when the user input some values it dynamically outputs the amount. The calculation should add the packaging amt with transport amt and subtract...
18 Nov 2019 by ahmed_sa
I work on angular 7 project integrated with asp.net core 2.2 API this Angular project done by another persons and i dont know any thing on project I need to modify left side menu and what component called when click on any item on menu but i need any tools or any thing help me to show...
6 Oct 2022 by ahmed_sa
I working on web application using web api but i can't determine which frond end tool i will use React or angular 11 my application i use it have more pictures so which is best for performance and speed What I have tried: which too front end...
13 Oct 2021 by Ahsan Ullah 2021
I am using React Stripe in a React project. I can learn from their documentation that to use Element components and Stripe objects, I need to set Elements provider in the root file of React. And to use Elements provider I need to call loadStripe...
14 Jul 2023 by Akash Kr. Das
I have a MERN app, used Fetch API. I want to delete specific data upon clicking. Whenever i am clicking on delete its showing 'cannot delete.' and Status is 404: Not Found Here is my front end code please help me with this What I have tried: ...
29 Jan 2021 by Akash Tawade
I trying to fetch data from spring boot controller but the data not appeared in front side ReactJS. Spring boot controller working fine in localhost and data also appeared in localhost. Spring Boot Controller: package...
29 Jan 2021 by Akash Tawade
I got my mistake. Solution: we need to enable CORS from server side so that we can fetch data from front side. To Enable this we need to add one function in server side application. I'm using spring boot so, you need to add this function in...
24 Jul 2023 by Akram El Assas
Open Source eCommerce Platform on Next.js
U 29 Apr 2024 by Akram El Assas
Car Rental Platform with a mobile app
U 29 Apr 2024 by Akram El Assas
Rental Property Management Platform with a Mobile App
28 Jun 2022 by ale fan
I got this problem throw new MongooseError('The `uri` parameter to `openUri()` must be a ' + I am uploading my full be please tell me what i can do What I have tried: **index.js** const Koa = require("koa"); const KoaRouter =...
27 Sep 2021 by Ali Bahaari 2021
Consider this: ; I add the component above which is pair of inputs dynamically...
11 May 2018 by Ali Javani
Hi all great programmers thanks for reading my question. My problem in react language is I want to call another component by one click. if you see code I have provided the necessary explanations with //******* class CategoryList extends React.Component { constructor(props) { ...
25 May 2018 by Ali Javani
in need handle click with current row data in react-table What I have tried: Cell: ({ e }) => ( { debugger; console.log(e.cn); console.log(e); console.log(c) }}> Users ) all results is undefined !
15 Apr 2022 by Aman Singh Apr2022
document.addEventListener("DOMContentLoaded", function () { var swiper = new Swiper(".mySwiper", { spaceBetween: 0, loop: true, speed: 1000, autoplay: { delay: 4000, disableOnInteraction:...
11 Nov 2022 by Amey K Bhatkar
An overview of MFE and how module federation plugin helps to build MFE in React
11 Nov 2021 by Amogs
Hello guys, I'm kind of stuck, I'm trying to send a password reset email using AWS SES in Next.js. But I am getting the error below: MultipleValidationErrors: There were 2 validation errors: * MissingRequiredParameter: Missing required key...
24 Dec 2022 by Amogs
He guys, please I need some help with my NextJS/NodeJS project. I'm having the error: TypeError: Cannot read property '_id' of undefined at currentInstructor (C:\Users\Sammy\Desktop\eLearn\server\controllers\instructor.js:57:30 I can't...
27 May 2023 by Anandhakumar M
i was generated the hash value for payUmoney UI. i have required data for bolt launch method in payUmoney but the thing is how i call the bolt fuction in react js i got the only one reference -...
15 Feb 2022 by Andre Oosthuizen
Remove your Home constant completely, use the div inside your header as you are already making a call to "user" there, something like this (you need to play with it as I have no idea what end result you require) - function Header() { const...
24 Feb 2022 by Andre Oosthuizen
Extraxt from here (covering other platforms like MS, Ubuntu etc) and in your case Linux - Possible Solution For linux users: uninstall NPM, to do it go to /usr/local/lib/node_modules and do: sudo rm -r n npm npx Once uninstalled, re-instal...
14 Feb 2023 by Andre Oosthuizen
These might help - How to Pass Data and Events Between Components in React[^] Using Context to pass data[^] How to Pass Data from Child to Parent in React[^] a Snippet from the last link - While there is no direct way to pass data from the...
19 Feb 2023 by Andre Oosthuizen
Make sure that your server is running and listening on the correct port. In this case, it should be listening on port 3000, yours seem to be running on 5000. Check that the API endpoint /api/user/register is correct and that it exists on your...
14 Jul 2023 by Andre Oosthuizen
The problem lies within your 'removeElm' function when you try to laod 'userid - the path to 'demo/users is not found and thus no 'userid' is returned. Some steps to try and find the reason why the file is not found - 1) Make sure your localhost...
20 Jul 2023 by Andre Oosthuizen
Laravel and React not one of my strong points. You need to explicitly pass the 'setMyState' function down from the parent component to your 'ProductsMy' component - Using a function in `setState` instead of an object[^] Remove the '{children}'...
21 Oct 2019 by Andy Lanng
Seems pretty simple: https://www.npmjs.com/package/react-infinite-scroller[^] I can't see any implementation of infinite scroll components in your code. 1: look at the examples on the npm page 2: include some simple pagination in your record fetch 3: keep track of what pages have loaded (a...
12 May 2022 by Ang QiShao Ben
I am working on a product that takes a file from API and read as a blob. But pressing the play button on the video does not work. I have tried using tried using querySelector or a useState variable. All not working. There are no errors as you can...
19 Jan 2021 by Anil_B
please send the code for this .. What I have tried: In reactjs how to send email with attachment..
17 Apr 2023 by Ankan Chanda 2023
Hi, I need help with this ReactJS application in making a Pie chart. So there are three components namely: Devdropdown , the main one and two child ones are Tables.jsx and Chart.jsx. So, the table got displayed while passing props from the...
18 Oct 2022 by Anupma Sharma
I'm getting 500 (Internal Server Error)while submitting the form in nextjs. import React from 'react'; import {useState} from "react"; export default function DigiContact() { const [name, setName] = useState(''); const [phone, setPhone] =...
6 Jul 2019 by Anurag Gandhi
A general purpose quiz application in React that can be used to run quizzes, mock tests, surveys, etc. This is an alternate version of my another article: "Quiz Application in Angular".
2 Apr 2022 by Apoorv 2021
I want to use the "strong" tag while updating the state. But instead, it is directly printing the "strong" tag and not text in bold. I want my text in the state to be visible like text but instead it is directly pasting those HTML tags in DOM. ...
8 Jun 2022 by Apoorv 2021
How to divide this array:- [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15] into two different arrays with one set of consecutive sequences in one array and another set of consecutive in another array. for eg : array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12,...
14 Nov 2022 by Apoorv 2021
I have a state object with the name firstDig which is as follows:- const [firstDig, setfirstDig] = useState({ firstDigit: "", // first digit to which secondDigit is added/subs/... operator: "", // middle operator secondDigit: "", ...
18 Jul 2017 by arunkx
My textinput component is given below: const React = require('react') module.exports = (props) => { return ( props.onBlur(props.fieldName, e.target.value)} ...
8 Sep 2022 by arye 2
I have added my backend to heroku and my frontend to netlify, however when I'm trying to run my app whether it is locally or via netlify, I'm getting the below error message when logging in or/and registering locally: Uncaught Error: Element...
28 May 2020 by ashoka187
Can someone share code to retrieve user details along with thumbnail image to be displayed basis the input username. This has to be accomplished using asp.net core and react. I am pretty new to this technology, please help. What I have tried: ...
15 Oct 2022 by Auto Samachar
const [getselectedlist, setSelectedList] = React.useState([]); const [getSelectIndex, setSelectIndex] = useState(0) const setSelected = (getrow, index, selectIndex) => { if (getSelectIndex !== selectIndex) { setSelectedList([getrow])...
2 Sep 2022 by AW360
Hi, I want to rerender a image with the new value of the useState of the component that its in a child component passing the props Im adding the code from both component What I have tried: import DefaultColor from './DefaultColor'; function...
26 Dec 2017 by bbirajdar
Dear Community I have a React JS application with a set of components. Some are simple components which render HTML whereas others are nested components which use other components in it. Here is the example - Header.jsx component uses the HtmlRow component referenced by a alias.
17 Feb 2022 by Beka Qi
Is it something wrong in my code that's only filter the data once, and after that I got no data when I search it again. What I have tried: const results = data?.map(singleData => { singleData.websites = singleData.websites.filter(website...
29 Aug 2022 by BEST Physics
try to change AddCartData: [] to AddCartData: {}
30 Apr 2021 by bhagwan 3
Below is class base react component to add videojs custom buttons. I am trying to add custom buttons using react hooks, but not getting right solutions. import React from 'react'; import VideoImageOverlayChild from...
25 Apr 2021 by bhargav_venkatesh
I am getting this below error > Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite...
1 Apr 2022 by Bhavik Sejpal
Hello community I want to edit my data which comes from API and display in input field in React JS. const UserInfo = () => { const [userData,setUserData] = useState({myObject: { name: '', email: '' }}); const {id} =...
13 Jan 2019 by Bohdan Stupak
A quick glance tells me that your import statement is wrong as you should also import Form from antd. And also looks like you should use Form.Item instead of FormItem There might be more errors so I suggest you to verify your code against this demo which has required functionality
25 Sep 2022 by Chris Copeland
I am aware that if you JSON.stringify() an object it will only take the key values leaving it basically unusable when parsed back through the JSON. This is exactly right, the Stringify method is designed to convert key-value objects into JSON,...
21 Dec 2022 by Chris Copeland
You should take a look at this monorepo pattern[^] approach. Essentially you can create a parent workspace, then create child applications beneath it (or import them as your case may be) and reference them from the parent project. Just bear in...
25 Sep 2017 by Chris_Yu
Functional programming in front-end development
7 Jul 2021 by codinglife2021
I am using react context to handle the state and also to avoid prop drilling. When the user clicks on the Login button, it triggers the functions passed from UserContext to update the new state e.g setLoggedIn(true), setToken(response.token) and...
15 Nov 2021 by Cristo Ferrao
Hi, I am using asp.net core 5.0.12 with react selected the inbuild authentication for individual everything working login register. I want to add roles for the authentication for register and login form but the design for the UI of login,...
13 May 2022 by Damian Roiz
I am building a grid of link cards corresponding to services, I want the content from this grid to shift aside when each card is clicked to get the description of each service. Therefore I am building a matrix of object containing the content of...
3 Dec 2022 by dan85
I am building a react jsx portfolio website. The site is almost finished and I am trying to include a theme switcher. I have tried everything I can think of and can't get the switcher to function properly. Everything else works fine. Whenever I...
8 Oct 2022 by daniel wakeley
So I'm trying to add some SVG photos to my React project but I'm not sure how I can add them into my file system on VS code. I know how to render them and import them using their relative path the only thing is I'm not sure how to get them onto...
19 May 2023 by daniel wakeley
So I'm working on a project and when I add in functional components to the page they completely cover each other up. I try adding margin and using all sorts of positioning but to no effect. The page does not produce enough height for them...
19 May 2023 by daniel wakeley
} /> } /> } /> ...
24 Nov 2023 by daniel wakeley
Okay so I'm making a project that let's a user query an api using their own input. I want to create a webhook or websocket system that when a user creates an api query a new websocket connection is made and listens for matches in the query...
17 Apr 2024 by daniel wakeley
So I'm working on a project in React and added in some text into my hero section over the image. The problem is the text has a white background. I've never encountered this problem before. What I have tried: I've tried going through every...
22 Mar 2021 by Darshan Kumar B
Hi Everyone, I'm new to ReactJs please help out of this issue i'm trying from past 2 days not able found any solution C:\Users\user\Desktop\reactApp> npx webpack info System: OS: Windows 10 10.0.19041 CPU: (8) x64 Intel(R) Core(TM)...
10 Apr 2016 by Dave Ceddia
How to get to grips with React (as an Angular developer)
15 Feb 2020 by Dave Kreskowiak
You don't. ReactJS code runs in the client browser, not on the server. Your .NET code runs entirely on the server-side.
6 Oct 2022 by Dave Kreskowiak
Your question is un-answerable. You haven't said anything about what you're doing on the "front end" and why speed matters at all. Most web applications, unless you're doing large amounts of processing on data in the browser, do not care about...
5 Apr 2021 by Demogorgon 2021
I have been given a ready made react component, in which I need to pass data as props but somehow I am not able to see the props data when I console log it. Can someone help me understand if I am passing the prop correctly .I am not aware what...
5 Feb 2018 by demouser743
Hi all I have my working code here what all I need is I need to assign custom text, here is the code pen for the same.What I need is I would like display the username in the header section can some one help me What I have tried: A Pen by Dorababu[^]
27 Oct 2022 by Dev Contractor 2022
Why am i getting this error here : here is my home.js : import React, { useEffect, useState } from "react"; import { useNavigate } from "react-router-dom"; import { v4 } from "uuid"; import { auth, database } from "./firebase"; import...
26 Oct 2022 by Dev Contractor 2022
i fixed it... the problem was i was importing ref from firebase storage and i was using firebase realtime database so when i used ref i passed in the database instead of storage that is why the error was occuring and thank you very very much for...
8 Aug 2021 by Devtestit
Hello guys, I have component 1 contain props1 and props2 as optional props in component parent i return React.cloneElement contain props like this React.cloneElement(children, { props1:{ ... children.props.props1, Val:'test' }, props2:'test'...
19 Jan 2020 by Dipankar937
You can definitely do this. But I suggest that Create your React project with the use of Visual Studio React Template. Because all configuration will generate automatically. Also you can do it in any react project. In React project 'react-router' is responsible for routing. You can see also...
29 Dec 2022 by DKurbanov27
I need to call this logEvent function inside useEffect hook only when the searchTerms string is changed. The problem is that total_result is equal to the previous state of value. So I need somehow get the actual latest value of...
8 Jun 2022 by Dougy83
Have a look at the splice function. let arrnew = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 17, 18, 20] ; let arr2 = []; for (let j = 0; j
31 Aug 2021 by dsn 2021
firebase : The term 'firebase' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 +...
2 Dec 2020 by dushan anu
I am a beginner in web development. I have currently engaged in a react project and been trying to fade a text using onChange event of a range slider in react.js. The Problem is, I can't understand how to link correspondent values of range...
14 Apr 2020 by edp.kharind
I am going to create react js application first time.I would like to know how to use "Editable Grid" to make Data Entry application (Invoice apps). What I have tried: I have check material-ui data table but i would like to know which is better...
10 Sep 2021 by Eduardo Moraes Rigo
Hello, i'm coding an app and i'm having some issues adding an marker to the map, i'm using React and Mapbox to do it, here's the part of the code: import * as React from "react"; import { useRef, useEffect, useState, useContext } from...
20 May 2016 by Eric Greene
This post serves as an introduction to a series of blog posts on how to build components with React.
10 Oct 2023 by ernie lipford
I'm using the react asp.net core preview project with Visual Studio 2022. I have created a controller called WordController. My vite.config.js is as below. When I run the application, however, the request still keeps resolving to...
10 Mar 2020 by FireMonkey92
HI, I am facing an issue with the browser support in IE 11 of my reactjs project. Here is my code sample. package.json { "name": "my-project", "version": "0.1.0", "description": "", "scripts": { "start": "npm run dev", "dev":...
25 Mar 2020 by FireMonkey92
Hi, I am working on a react project. My requirement is to clear redux store when ever the use closes the browser. (Not on Refreshing the page.) i have done some research on it and found about EventListner events "beforeunload". Here what i have...
17 Apr 2020 by FireMonkey92
Hi i am getting an warning message on my react functional component. Warning : Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions...
1 Oct 2023 by flyshivanshu
export default function UserProfile(props) { const { isLoggedIn, user, profile } = useSelector((state) => state.AuthReducer); const { wallet, paired_curency_price, coins, wallet_loading } = useSelector( (state) => state.coinDBReducer ...
22 Nov 2022 by folza
After npm start in terminal: Compiled with problems: ERROR in ./src/logo.svg Module build failed (from ./node_modules/@svgr/webpack/lib/index.js): Error: EACCES: permission denied, open '/.config/svgrrc' Where can I find '/.config/svgrrc' to...
28 Dec 2022 by folza
We have an input field and a button with the value "Text". I just want to append the input field with the button's value by onClick. What I have tried: function Screen() { return ; } ...