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
-
1
votes0
answers30
viewshow to set up a Drawer component so that it pushes all the content of the site to the side and is not yet affected by the scroll?
The idea was to push all other contents of the other Box to the right when the Drawer was, but it was immune to the mouse scroll leaving its contents always visible <Box> <Sidebar…
-
1
votes1
answer40
viewsHow to set a plugin settings next to Next.js settings?
I have a project that uses a dependency called @uiw/react-md-editor and, for it to work with Next.js, I need to create the file next.config.js and put this code: // next.config.js const…
-
1
votes1
answer29
viewsDifficulty with Context API [REACT]
I need a timer component to be reflected in another distant component. To do so, I created a context to save the timers states created, since the later timer (depends on the user’s action) should…
-
1
votes1
answer49
viewsHow to use componentDidMount, componentWillUnmount and declare the initial state in functional components?
I’m trying to make a class component to functional component conversion. The code I have is: constructor(props) { super(props); this.state = SelectionToolbarStore.getState(); } componentDidMount() {…
-
1
votes1
answer44
viewsHow to create a loop to list items by clicking a button?
I made a stopwatch and when clicking 'Mark Back' it shows the lap time. If you click more times, it will 'listing' the time, one below the other. What I wanted to do and I’m struggling to do is…
-
1
votes1
answer26
viewsError: Too Many re-renders. React Limits the number of renders to Prevent an Infinite loop. Reactjs
I am carrying out a project of a Bootcamp and I came across this problem. Error: Too Many re-renders. React Limits the number of renders to Prevent an Infinite loop. The part that’s making a mistake…
-
1
votes1
answer36
viewsHow to map the value of 2 inputs in React?
I’m creating a kind of Todolist in React and had the idea to use two inputs. The code is divided into 3 components: App.js: import React, { useState } from "react"; import Form from "./Form"; import…
-
1
votes1
answer39
viewsHow to make an edit function in an entire list with 2 inputs?
I am doing a whole list and it has two inputs. My problem is that I am not being able to do an editing function for these inputs. For easy viewing I will send the code, images and codesandbox link.…
-
1
votes1
answer48
viewsHow to append a JSX component inside an item from . map()
I have this line structure: And my idea is that by clicking on each line, a JSX component is rendered according to the item that was clicked. I got it with the following code, but I feel it’s not…
-
1
votes1
answer59
viewsHow to clear an input after clicking the button?
I’m having trouble finding a solution to clear the fields input after clicking the button calculate. Follow code in simplified form function EqBernoulli2 () { const [Pt, setPt] = useState('') const…
-
1
votes0
answers25
viewsConcurrent React JS requests with queued AXIOS, without using Promise.all or Promise.allSettled
I have the following situation: a form with a single input and a list with results that will be displayed on screen. The idea is for the user to enter a code in the input, and when changing the…
-
1
votes0
answers52
viewsWork with heavy / time consuming functions in React (Node.JS)
I have an React project where when the user opens a page, the app starts creating a 2048 RSA key pair. How do I ensure that the page does not "lock", IE, it is in the background and when the key is…
-
0
votes1
answer104
viewsReactjs + Angular + Babel
Good morning I need to use Reactjs in a project that I already use Angularjs. I was able to do the integration, but without using Babel, that is, I was only able to make Angular and Reactjs…
-
0
votes1
answer55
viewsCodecademy React.js doubt
I’m doing the React.js exercises at Codecademy.com and I got caught up in this issue. I don’t know what’s wrong and I can’t move forward.…
-
0
votes1
answer129
viewsDeploy React on Heroku
Guys good morning, I made a deploy of a React app on Heroku, but it is totally without css. I need a little help because I have no idea what it might be.
-
0
votes0
answers53
viewsReact-router: Maximum Callstack Exceeded
I’m trying to configure the routes for my application but when I get official example on github an error of "Maximum Callstack Exceeded". I’ve checked everything point by point and can’t find my…
reactasked 8 years, 3 months ago Raphael Rosa 172 -
0
votes1
answer239
viewsReact Native shows error when I try to emulate Android
I have an app that should be tested on an Android emulator. After setting the React Native and Android environment (including the environment variable). I can’t run my app on Android emulator.…
-
0
votes1
answer1678
viewsonClick on dynamically created React components
I have a component user-defined called <Match> that is created dynamically within another component <Event>. But when putting onClick on the component an exception is popped. How to…
-
0
votes1
answer1022
viewsStatic routes in React for two separate pages
The situation is this, when creating an app with React + webpack I have an html file, being it an index.html that loads a Bundle.js (default webpack) to be displayed in the browser, but my app needs…
-
0
votes1
answer215
viewsReact Native Drag and Drop Listview
I need to implement bizarre functionality in React Native. Here’s the thing, I need to be able to drag and drop to remove an item from one horizontal Listview and add it to another. The big issue is…
-
0
votes1
answer681
viewsCommand `run-android` unrecognized - After installing navigation
After creating a React-Native init project test and install the navigation (npm install --save react-navigation) simply after that the run-android command is no longer recognized. I found several…
-
0
votes2
answers292
viewsHow to render Children in React?
I have the following components: Obj import React from 'react'; export default class Obj extends React.Component { constructor(props) { super(props); console.log(props); } render() { let objs =…
-
0
votes1
answer132
viewsRN Navigation - Draw Navigator
My app will feature various types of navigation on different screens. I started using index with stacknavigator and a second page trying to configure Drawnavigator and I’m not getting. I saw in an…
-
0
votes2
answers77
viewsReact Redux initState
It’s common when you work with Redux set an initial state, example: const initState = { pagInicial:1, pagAtual:1, maxLinks:2, maxReg:5 } So far so good. Now and when I need an initial state,…
-
0
votes1
answer441
viewsProblem when mapping api with Axios and React,
Good afternoon guys, all right? I am trying to make an application with React, however, when trying to map a random API, to try to render the data, it fails to return what I am trying to pull. Would…
-
0
votes0
answers1869
viewsCalling a function after rendering a component in React.js
I’m playing an old-fashioned game in React.js that uses the Minimax algorithm to produce the AI moves. This algorithm, from what I’ve seen, is taking between 600ms ~ 1000ms to return a play in the…
-
0
votes1
answer392
viewsRedial after sending form with React-router-dom?
Good afternoon guys, all right? The situation is this, I am using the React-router-dom in an application in Reactjs and need that after clicking save in a form, the same goes to the listing screen,…
reactasked 6 years, 10 months ago gabrielgrs 457 -
0
votes0
answers250
viewsVisual Studio Code and React
I started recently studying Reactjs and at first I chose VS Code as a tool for development, but something bizarre is happening that does not help the development. Every time I need to save something…
-
0
votes1
answer106
viewsStore data on the device
I am developing an APP with React-Native and has a problem that I am looking to solve, I make a communication with an API and it returns me a token for consumption of services when authenticating…
-
0
votes2
answers640
viewsState Global using reactjs
I’m starting at reactjs and need to do a global state to hide/show a div but click this on another file containing another state, as I do to let it global?
-
0
votes1
answer282
viewsReturn the last Array date
Hello, I have a code where I am searching a list of dates. for(var i = 0; i < data.list.length; i++){ if(Date.parse(data.list[i].date) >= dateA){ console.log(data.list[i].date) } } i wonder if…
-
0
votes1
answer4411
viewsWhat is the difference between Function and Class in React?
I’m studying React now and I’m having a little doubt. What’s the difference between the two? From what I’ve seen, they both do the same thing.
-
0
votes0
answers52
viewsHow to access a tag element
I’m trying to pass my javascript code (Reactjs) the path image: And in the code I write like this: source={{ uri: this.state.modelo.baner[0].url_img }} And the browser accuses this error: Typeerror:…
-
0
votes1
answer41
viewsHow to Get Data via Wordpress API
I wanted to start learning React.js and for this I decided to make a theme written in React for my wordpress, using the 'new' functionality WP API. How do I get access to the API from my computer? I…
-
0
votes0
answers28
viewsDoubt in function setState
I wonder why use and working when we use setState, in a few moments I see examples like this below: this.setState({ edit: { ...this.state.edit } }); Why does it use the three points (...) before…
-
0
votes1
answer97
viewsHelp positioning icone/view under image
would like to take a doubt of CSS/HTML,I will start a project in REACT NATIVE, and in the project I came across this layout objective: My doubt is, how can I put the icone (STAR) under the…
-
0
votes1
answer199
viewsReact Native image shadow box
I’m having a hard time putting one shadow in the picture, I tried to put in the View and in the Image but it didn’t work. <View style={styles.ContainerImageProfile}> <Image…
-
0
votes0
answers420
viewsRecover data from firebase
I’m creating an app with react and currently need to recover some data from database using the library of firebase, for this I created a module that performs the configuration: Filing cabinet:…
-
0
votes1
answer15
viewsSwitchcase made for REACTFLUX is not getting the right case
Why aren’t you getting the.type action? just exits by default. The log is saying "editing" which is the default case instead of creating a new article. The code handleActions(action) { switch…
-
0
votes0
answers456
viewsImage storage in mongodb
I’m developing a mobile app in React where there will be several profiles, with up to 5 photos each. Our api is currently in aspnet core 2.0 and we use mongodb as a database. My question is this,…
-
0
votes1
answer1644
viewsMount calendar with React
I’m having a question of how to analyze the amount of days a month for a certain calendar, I have to set up a "Nav" with the weekly days of each month, but the problem is when I arrive on the last…
-
0
votes0
answers375
viewsonChange on jQuery Input Mask does not work
I have an React component for user registration, in some of the fields I added a Jquery mask, but since I added the mask, the onChange command stopped working (only in the fields with the mask) one…
-
0
votes1
answer2263
viewsWarning: validateDOMNesting(...): <a> cannot appear as a Descendant of <a>
Hello, I’m trying to use the component Link of react-router-dom to generate links in a data table, however, I am facing the following problem: Warning: validateDOMNesting(...): <a> cannot…
-
0
votes1
answer121
viewsIs it possible to fire two types of action at Redux at the same time?
I’m using Redux and Redux-saga in an application with React and with doubt when it comes to displaying the load to the user when a saga is launched. I don’t know if this is good practice, but I was…
-
0
votes1
answer1485
viewsHow important is . env in React?
I am developing a website in React and I came across the file . env and it contains the following script NODE_PATH=./src What would be your importance in React ? Because my server only worked when I…
-
0
votes1
answer572
viewsReact-Native scren splash screen
I created a component class with my screen splash. And I want that after a few seconds, the navigation goes to the other screen, I have already configured the navigation const SimpleApp =…
-
0
votes1
answer901
viewsHow to change the value of a defaultProps on an React component?
Good afternoon, I have a loading component that uses a default props. class Loading extends Component { render() { const loadingClasses = classNames({ 'loading': this.props.loading, }) return (…
reactasked 7 years, 3 months ago Aline Vianna 167 -
0
votes1
answer1102
viewsHow to close one screen (navigation) in React Native, from another
I need to know how I close the canvases I’ve already opened behind. Like: I’m going A - B - C - D ...when I get to D, I want to go back to A. But, if I press the button to go back on both Android…
-
0
votes1
answer522
viewsReact Native and hybrid?
I was wondering if React Native and really hybrid, like Ionic, that you program a code only and export to the two platforms (IOS/ANDROID), or and similar to Xamarin, that you make the 2 different…
-
0
votes1
answer94
viewsExample input take value and log console with this value when you click send button with React
By clicking the send button I want to take the input value and log console the value entered by the user! I think it’s simple but what I’m trying to do is more complex but will serve to implement…