Most voted "react" questions
It is an open source Javascript library for creating user interfaces. It is maintained by Facebook, Instagram and a community of individual developers and other companies
Learn more…1,420 questions
Sort by count of
-
0
votes2
answers258
viewsSort array within another array with Reactjs
Staff I set up a table with the data of an array where will have attack and defense points of each player associated to a team. You will have the total points of attack and defenses of each player…
-
0
votes2
answers97
viewsReact components that receive ownership of an object as content do not update, how to deal with it?
I basically have a state that is a complex object and several components that render only one property of it, as the application is kind of large I made this prototype to illustrate: //Component…
-
0
votes1
answer53
viewsCannot scroll to Flat List
I’m building a recipe app with React Native, Expo and Firebase... I’m creating a Flatlist to render cards from an array of objects, but when the cards exceed the height of the screen I can’t see…
-
0
votes1
answer286
viewsNext.js does not load jsx
Recently I’ve been researching about Next, the js framework of the moment, and I want to start training with it with some projects. The problem is it doesn’t run on my computer, no matter what I do.…
-
0
votes1
answer35
viewsCreate a table separating dates by quarter with React and Node
The table needs to look like this: She’s like this: I was able to create a table using Sequelize with the data of each unit, with cnpj and everything, and I made a table of dates related to this…
-
0
votes0
answers130
viewsMongoparseerror: Invalid Connection string Express+Mongo
I’m using for the first time the express and the Mongo, it works normally locally, no authentication, but when I went to cloud, in the Umbler hosting it started to show error Jan 07 14:05:19 } Jan…
-
0
votes1
answer65
viewsChoosing how many DIV’s to mount at a time within a . map()
Good morning guys, I went through a recent situation where I had to resolve the basis of a gambiarra but I wonder if there is a way to do what I had in mind at the time but could not accomplish. The…
-
0
votes1
answer140
viewspass an id into the modal in React
EDIT: I have a crud in React, and in it one of the buttons is to delete a user. When I click delete, open a modal to confirm, below the button, sending the id to be deleted: <button…
-
0
votes0
answers53
viewsHow to modify the multer filename with front variables?
Good morning, I am creating an application React and Node, and at the moment I need to upload a PDF file, the code works well, but I wanted to know how when it comes to mounting the filename of the…
-
0
votes0
answers26
viewsList testing in React
I need to create a test to test a list (li) in Reactjs, the list is rendered after clicking the send button. My code: import React, { useState } from 'react' import Button from…
reactasked 3 years, 10 months ago Emerson Moreira 3 -
0
votes0
answers43
viewsModify Pagination in table using Ant Design
Hello, I’m new to React and researching a little bit about some React UI, I found Ant Design. I followed the example of the site using the Table component, but the pagination is not the same as the…
-
0
votes0
answers30
viewsDjango Rest Framework + React I can’t return the Cookie
I’m starting with Django and React development. I tried to make a User Authentication page. When loading the User Registration page I call the API in Django to return the CSRF via Cookie and then I…
-
0
votes0
answers38
viewsError calling localhost API in . Net Core and React Native. Returns (Network Request File) error
I’m trying to connect a request from my app using React Native calling this Api that was made on Dot Net Core. This is the desired result. But when access Android Virtual Device returns me an error…
-
0
votes0
answers68
viewsHow to stop youtube video when you click a button?
I’m making a website with React and I have a carousel with some Iframes with youtube videos, when I slide to the next video the previous one is still playing. Is there any way with Jquery or JS to…
-
0
votes1
answer32
viewsPassing method with parameter
Is it possible for me to use a function of the parent component that updates the state of that same component in ANOTHER component? (this function has a parameter that would be the new value to be…
-
0
votes1
answer58
viewsError while trying to render ternary conditional operator component in REACT
This is my component {portaisAtuais .filter(portal => !portais.includes(portal.id)) .map((portal, index) => { const { nome, id } = portal portaisAtuais.length === index + 1 ? ( <div…
-
0
votes0
answers44
viewsAPI items do not appear on the screen, only on the console
I need to fill out a table with my API data. I got a get to access the API and tried to put all the items inside an array within my state called "afps" and gave a setState to fill this array with…
reactasked 3 years, 10 months ago Rodrigo Cassimiro 1 -
0
votes0
answers48
viewsI cannot use Onesignal in Reactjs/Next.JS
I’m making an implementation, using Next.JS and I’m using Onesignal to send push notifications to users. The big problem is that the public directory of index.html cannot be changed as it has many…
-
0
votes1
answer32
viewsPass an array to a webapi controller
I’m having trouble passing an array to a controller via Axios. Example of the WEBAPI Controller code: [HttpGet] [ActionName("openshape")] [Route("api/shape/openshape")] public…
-
0
votes2
answers51
viewsError trying to save in BD
I am using the React and when I try to save in the database returns me this error: Cannot read property 'protocol' of undefined My code is this: const baseUrl = "http://localhost:8000/api/employee";…
-
0
votes1
answer176
viewsTraverse a . map() in inside . map() React jsx
I’m using React with Typescript. Is it possible to go array inside an array? This is my array: const menu: Array<{name: string; to: string; icon?: ReactNode; submenu?: any}> = [ { name:…
-
0
votes1
answer27
viewsProblem with iteration in React
I’m consuming an API, and putting your data in a 'li', only it’s popping the page because I mapped all the api items: function showState(states){ return states.map(state => <li…
-
0
votes0
answers12
viewsStandalonesearchbox launching error - React-google-maps
my React application is returning error Uncaught Typeerror: Component.unregisterAllEvents is not a Function for the Standalonesearchbox of the React-google-maps. I’ve tried everything, even going…
-
0
votes0
answers16
viewsModal Material-ui as soon as the page loads
Good morning, everyone! I’m having trouble understanding the logic and dynamics to make the modal of the material-ui appear as soon as the page is loaded, at the moment I haven’t touched the code…
-
0
votes0
answers58
viewsApplication React/nextjs on Cpanel server with Nodeselector does not run
I am creating a React/nextjs application and deploying it on a Node Cpanel server (Node is through modpassenger and cloudlinux nodejs selector), I can install the dependencies normally using the npm…
-
0
votes0
answers46
viewsHow can I simplify HTTP requests in React?
I am currently working on a project that has modules with multiple API requests. Similarly, cases of "ordered" requests are frequent, that is, they are carried out as long as a given condition is…
-
0
votes1
answer45
viewsBy clicking on a checkbox the next component appears
I would like to know the best way to start rendering this first object and when you click on the checkbox it will render the next one, hiding the previous one and so on. const [expensesData,…
-
0
votes0
answers21
viewsHow to allow youtube video to be expanded on mobile MI 8 SE?
I have an app made in React-Note that there is a video embedded in a webview. A client complained that she can not expand the youtube video on the full screen of her mobile phone, I took the model…
-
0
votes0
answers16
viewsHow to make a Dispatch with the variable type in React with useContext
I’m passing a file made in Mobx to Contextapi, but Mobx is in class mode and the initial states are like this: @observable nomeFantasia = '' @observable cnpj = '' @observable inscEstadual = ''…
-
0
votes1
answer99
viewsCheck active React checkbox
Hello, I need to check if one or more checkboxes are or are marked, to submit the form. The form can only be submitted if one or more checkboxes are checked(s). Follows my code: import React, {…
reactasked 3 years, 9 months ago Emerson Moreira 3 -
0
votes1
answer150
viewsHow to work with anchors at Reacjs
I would like to call an id inside my html page Type: <a href="#meuid">Meu id </a> <section id="meuid> Meu Id </section> No React I’m trying like this: header js. import {…
reactasked 3 years, 9 months ago adventistaam 3,354 -
0
votes1
answer46
viewsReact-Native: Flatlist does not render JSON data on mobile with installed apk
Hello I have a problem a little weird... I have an apk generated in release mode with signature everything ok,but when I install in my cell a Xiomi 7 on the home screen does not redenrize the…
-
0
votes0
answers18
viewsI need help with Dispatch within the context in React
I made a resquettes to save an image in our API but I’m having problems in the Dispatch of this resquet and worked: const trocarAssinatura = async img => { dispatch({ type:…
-
0
votes2
answers62
viewsI need to place coordinates from Mongodb on a map with reactJS
I’m creating a google maps heat map with reactjs, I was able to implement it and pass the coordinates manually, but I need to create the coordinates dynamically coming from the bank in Mongodb, on…
-
0
votes1
answer102
viewsI can’t run create-React-app
When executing npx create-react-app my-app my terminal is not completed and at the end is created the folder that way: └─ my-app ├─ node_modules ├─ package.json └─ yarn.lock I’ve tried to npm…
-
0
votes0
answers19
viewsChange application name in Electron notification
How do I change the name of the application that appears in the Windows 10 notification using Electron with React? I highlighted what I want to change with a red square. My notification is called…
-
0
votes0
answers38
viewsHow to test a saga function by mocking a generating function?
So far I haven’t found an efficient way to test the sagas of my "start" function with the redux-saga-test-plan along with Jest. I already tried to fuck the function fluxo, but I did not succeed. My…
-
0
votes1
answer36
viewsReact - Selecting a Card on the Screen
I’m doing, as an exercise, the Nelio Alves project (Devsup Week 2.0): https://github.com/devsuperior/sds2/tree/master/aula2 Prototype at the Figma:…
reactasked 3 years, 9 months ago Paulo Seibel 1 -
0
votes0
answers14
viewsError climbing IPA - New applications using Uiwebview are no longer accepted - React Native
I’m going up an IPA to Testflight on https://appstoreconnect.apple.com/ and I got the following mistake: Use of obsolete API - New applications that use Uiwebview are no longer accepted. Instead,…
-
0
votes1
answer55
viewserror : problem performing npm start , failed at the [email protected] start script - React
I’m trying to run my app on React by command npm start , but every time that comes along: # # Fatal error in , line 0 # Check failed: U_SUCCESS(status). # # # #FailureMessage Object:…
-
0
votes0
answers39
viewsLeaflet map with Tilelayer not showing
I’m learning to create maps by Leaflet and wanted to add a style Tilelayer, the problem is that it starts loading right at the beginning of loading and then returns to the default style of map, my…
-
0
votes1
answer72
viewsDoes not load video tag [ HTML ]
I can’t upload video to my React application. I’m using Chrome but I also tested it in Safari. It only generates a white screen. The tag is recognized because when I use Controls it enables. But the…
-
0
votes0
answers14
viewsRealtime Database duplicates records
Hello, I’m ranking a game using the Firebase database but every time I "push" the data Firebase makes two records. Code sample: The Handlegameover function is invoked when the Gameover variable is…
-
0
votes1
answer22
viewsHow to take all consoles.logs, errors, and alerts from the console to cleinte (devtools)
I have a next.JS application and I need it to be well indexed. I’m making some changes and improvements following Lighthouse. However a mistake of "good practices" appeared that I always had doubts.…
-
0
votes0
answers44
viewsI am with this error and I cannot solve it, can anyone help me? Cannot find module 'webpack-cli/bin/config-yargs' [closed]
I’m new in Act.js, well the point is I can’t find the solution to the problem below, I’ve tried other versions of Node.js and webpack-dev-server itself, but also unsuccessfully. This is my…
-
0
votes1
answer203
viewsHow to redirect to an external url using React useEffect?
I am trying to redirect to an external url ,using the vaiparala function by passing a parameter that I pick up from the click, the path arrives at the function correctly but the redirect does not is…
-
0
votes1
answer81
viewsReact component array with Typescript(.tsx)
I have a small project using Next.js, React and Typescript. The idea is that a set of values within an array in a . json file be transformed into the React components and placed on the page…
-
0
votes1
answer57
viewsError: Undefined Binding(s) when I’m going to give a
I’m trying to make a login system , I wrote the code and when I do it works perfectly , but when I made the connection to the front end using Axios it can’t send the typed data to the database. I…
-
0
votes1
answer21
viewsI cannot bring the data of the array that is showing on the console
import React from "react"; function TrackingResult({ data }) { if (!data || !data.length) return null; return ( <> <h1>Tracking Result</h1> <ul className="list-group">…
reactasked 3 years, 8 months ago Diego Antunes 11 -
0
votes0
answers47
viewsI cannot return the response of a post request with Xios from a function passed to child component
I’m using the Google Translation Api, basically the function makes a request for their Api sending as parameters "q" (the text that needs to be translated) and "target" (a string containing the iso…