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
votes0
answers337
viewsFlatlist overlaying items when rendering more than 10 items
I’m having trouble implementing a FlatList in my application, whenever it renders more than 10 items they overlap as if they were with position: absolute; top: 0; and no matter the size of the…
-
0
votes1
answer25
viewsComponent is not being rendered
In my app.jsx file I have the import of the component "activities": import React from 'react' import { Container } from 'semantic-ui-react' import atividades from '../atividades/atividades' export…
-
0
votes1
answer28
viewsUndefined payload value React semantic ui
I am trying to use the semantic-ui form.select but am getting Undefined on my payload: What I tried to: <Form.Select fluid label='Gender' options={workoutOptions} placeholder='Atividades'…
-
0
votes1
answer40
viewsMy asynchronous function does not return the value where it is called, but within its scope is working right. Reactjs + google maps
import React, { Component } from "react"; import { Map, GoogleApiWrapper, Marker } from "google-maps-react"; import { MAPS_API_TOKEN, GEOCODE_API_TOKEN } from "../Enviroments/dev"; import Geocode…
-
0
votes1
answer52
viewsJavascript mask is breaking if I type the date quickly
I am trying to make a javascript data mask to use in the dd/mm/yyyy format React for a custom date selection component. If I press the keys slowly, the mask correctly applies the format, but if I…
-
0
votes2
answers98
viewsSelect does not let you select the option
Hello, I have a list of option of a select and I can’t select an item from the list. import React, { useState, useEffect } from 'react'; import styled from 'styled-components'; export default…
-
0
votes1
answer763
viewsonClick={} with div return with API content
talk boys. I’m having a beginner problem... I’m new to reactjs and wanted to know how to do it: as soon as I click the button it returns me the data of the api inside a DIV ex: (article, Section and…
-
0
votes0
answers31
viewsIs it possible to create a handleChange for a form that takes the values of a Redux store?
Next, I’m creating an app and came across this problem: I have a store set and want to create a data update form in Atlas (Mongodb). But I want this form, already come with the values that are in…
-
0
votes1
answer31
viewsWant to open two separate menus in my app?
I have a tab that opens my drawer: <Tab NavMenu={() => this.props.navigation.openDrawer()} NavProfile={() => this.toggleOpenProfile()} /> In my navigation it’s like this const AppDrawer…
-
0
votes2
answers285
viewsHow to use 'filter' in a flatlist (json API)
The api has the date as follows: "period": "2019-10-19T00:00:00.000-03:00", Pull my flatList like this: componentDidMount() { console.log(this.props.navigation) this.loadData(); } async loadData() {…
-
0
votes1
answer56
viewsHelp you create a menu component in React
It may seem like maybe I’m trying to reinvent the wheel, with a number of components available to use. But I set myself the challenge of being able to build my own menu. Just for learning. Perhaps…
reactasked 5 years, 2 months ago Damasio Ferreira 3 -
0
votes1
answer195
viewsSort method of my flatList
<FlatList style={{backgroundColor: 'white', marginTop: 10}} data={this.state.progr.data.sort((a, b) => a.start_time > b.start_time).filter(x => x.period ===…
-
0
votes1
answer140
viewsLink data in Mongodb
Model const AvaliacaoShema = new Schema({ responsavel: { type: String, required: true }, time: { type: Schema.Types.ObjectId, ref: 'Time', required: true }, pergunta: [{ type: Schema.Types.ObjectId,…
-
0
votes2
answers107
viewsDoubts with constant in React
Hello, This is my first project with React Js and I have a question, I imagine, basic. I have code below that is working perfectly: import React, { Component } from 'react'; import { FontAwesomeIcon…
-
0
votes1
answer1875
viewsReact Navigation Error: Undefined is not an Object (Evaluating '_this.props.navigation')
I’m facing the following mistake: Router.js import {createAppContainer, createStackNavigator} from 'react-navigation' import Main from './telas/Main' import Voluntario from './telas/Voluntario'…
-
0
votes0
answers22
viewsError of "this" within a child function after the build in typescript + Reactjs
I have a problem with "this" after the build using typescript + Reactjs, I have a function that reads an xmls to save in the bank, after tracking the error found that it runs where I declare "this"…
-
0
votes0
answers34
viewsReact - ref returns null in event handler
I’m developing with React at a time but had found no reason to use refs, decides to read the documentation more deeply and I came across several examples that indicate to developers where it would…
-
0
votes1
answer301
viewsHow to pass props from the React-table to another screen
I created two screens, one has a table using the React-table component that has three columns: code, group and edit button for each row. The other screen has a box with two text boxes where, when…
reactasked 5 years, 1 month ago Gabriel Midão 85 -
0
votes0
answers62
viewsMy front-end is not communicating with the Back-End
I created a simple form in React to communicate with the back-end (Node js), but when I click the form button (this button has an event that is responsible for performing the request to the back-end…
reactasked 5 years, 1 month ago Alberto_Santos 29 -
0
votes1
answer248
viewsStyling components in React
I am starting my studies/development with React but I have a problem in the stylization of the components. Even though importing the CSS file into my component, the style is not picking up. How can…
-
0
votes1
answer169
viewsReact: Display HTML in modal React Boostrap
I’m developing a SPA in React for an event and need to consume a folder with files HTML and display them in a modal of the React Boostrap, basically I have a section where is displayed all the…
-
0
votes1
answer130
viewsProblem with loop in React
This is a common loop problem in React, which is basically making hundreds of flames in my Aces. The component apparently isn’t inside the loop,. component: import React, { useState, useMemo } from…
-
0
votes1
answer17
viewsReact360 - Video events cannot be added
I’m trying to understand the moment a video was completed. I tried to use video events as the documentation says, but I can’t add an event listener to my video player; when I do, I get the…
-
0
votes1
answer341
viewsHow to fix the position of a header independent of the screen size?
Basically I’m building a burger menu and the same has this blue bar as shown on the screen below: But the more I press this screen, the smaller the size of this bar, which ends up hiding the button:…
-
0
votes1
answer31
viewsPromisse daughter is not getting into the father’s catch
I have this generic method that recovers something from the server: async criate(url: string, object: Object): Promise<any> { try { return response = await this.api().post( url, object ); }…
-
0
votes1
answer299
viewsReact asynchronous useState
I’m new to React and I’m having a hard time filtering data that will be displayed in a table. I have the filter inputs (there are 5 in total) and a filter button that calls a function, in this…
reactasked 5 years ago Leonardo Azevedo 1 -
0
votes1
answer56
viewsHow to change the standard typography class in a formcontrollabel - material-ui | React?
I would like to change the default properties of a formControlLabel of body for caption. I tried something like this and it worked: <FormControlLabel value="all" control={<Radio…
-
0
votes1
answer37
viewsWhy is nothing from my React app displayed?
I have an React app with the following code in App.js: import React, {Component} from 'react'; class App extends Component { constructor(){ super(); this.state = { firstNumber : 0, secondNumber : 0,…
reactasked 5 years ago victorgvargas 33 -
0
votes1
answer382
viewsnative onChange on React
I’m trying to catch the event onChange native of the browser, since the onChange React is executed with each key pressed by the user. It is possible to implement this? The native event I believe…
-
0
votes2
answers262
viewsHow to pass props to the state in React
Good afternoon. I’m developing a calculator app with React. I would like to know how to pass the value of a property from one of my buttons to the state value. For example: button 7, pass its value…
reactasked 5 years ago victorgvargas 33 -
0
votes1
answer653
viewsDisplaying data with React JS
Good morning guys, I’m trying to display on the screen a message typed by the user, something very simple but as I am new in React I don’t have much idea how to do this. Well, the code below went as…
-
0
votes2
answers131
viewsReact Native Reanimated
When installing the React-Native-reanimated and launching the application this error is generated: Looking for some on the internet I found this topic Link Following the information would only be…
-
0
votes0
answers116
viewsHow to test prop update in Reactjs
I created a component Button which has a function onClick and a prop disabled. The function defines a state isLoading as true, and prop receives the value of this state, that is, while the page is…
-
0
votes1
answer264
viewsHow to use setState in if Else
I need help using . setState() in if Else after render(), if possible... render() { const propsDesign = this.props.design, propsIcon = this.props.icon, propsText = this.props.text, propsDescription…
-
0
votes3
answers1171
viewsError using history.push Reactjs
I need to redirect to the root '/' I’m trying to use the history.push('/');, but when I click to send I get an error "Typeerror: Cannot read Property 'push' of Undefined" Detailed: Code: import…
reactasked 5 years ago Vitor Leonardo 46 -
0
votes0
answers81
viewsNot treating a catch is bad practice?
In my system I have the store, which is responsible for maintaining the status and also sending http requests to the server. An example of this is this method here: async novoLancamento( valor:…
-
0
votes1
answer258
viewsPass props via Bottom Tab Navigator
I’m developing an application with React Native and I’m having a problem, would someone tell me how to pass data from a screen to a Bottom Tab Navigator? I have a screen called Mainperson with a…
-
0
votes1
answer60
viewsRender Html
I am consuming a json where I have a key with the value of an html tag: import React, { useState, useEffect} from "react"; export const CardHome = () => { const [recebeDados, setRecebeDados] =…
-
0
votes0
answers50
viewsMake antd pagination dynamic
Good, good day. I’m working with paging using the Antd Table component, this table does the data display, I’m trying to get when the user clicks on a certain number, the front will request the back…
-
0
votes0
answers63
viewsReact + Typescript - Reuse function of one component in another giving error
Within a registration screen I have a pop-up to register a child record of the table in question. I have a function that makes the pop-up appear and disappear on the "Cancel" button. I decided to…
-
0
votes1
answer970
viewsUsedispatch() inside a useEffect() -> *Missing dependency*
ALERT: React Hook useEffect has a Missing dependency: 'Dispatcher'. Either include it or remove the dependency array React-Hooks/exhaustive-deps import React, {useEffect} from 'react' import…
-
0
votes1
answer203
viewsSide Menu is not displayed in the app made in React-Native
I’m developing an APP in React-On, I need to display a menu-left side. Although it does not display any error message, the side menu does not appear. I am using React-navigation-Drawer to create the…
android react react-native react-navigation react-routerasked 4 years, 11 months ago alexjosesilva 3,119 -
0
votes1
answer35
viewsisLoading on request is not working
I am trying to put an isLoading on my application made with React but it is not working, I have my handleSearch function that is making the request, this function is being passed to my component…
-
0
votes1
answer308
viewsUpdate Table automatically when deleting the record
Hello, I would like to know how to update the table automatically after deleting some record, however, every time I delete a record, I have to refresh the page again, and so I used the function…
-
0
votes1
answer155
viewsHow do I set the state of the parent through inputs in the child ? in React?
My problem is the following I am doing an IMC application, and I intend to change only the body of the screen when the result appears, without updating the page . my big problem is that I can’t use…
-
0
votes2
answers306
viewsError exporting footer in Reactjs
When running the npm start command returns the error below in the terminal, I am importing the file /components/footer/Footer.js in the archive /src/index.js //ERROR Failed to Compile.…
-
0
votes1
answer59
viewsHow to style child components through parents and components already created by @material-ui
I’m creating a sidebar and I’m using the Drawer from @material-ui and followed the first source-code of this link (https://material-ui.com/pt/components/drawers/): import React from 'react'; import…
-
0
votes1
answer95
viewsPopular object with async/await nested
Personal talk, I am consuming the Trello API to retrieve items from card-specific checklists of a frame. So I am making the following path. Retrieving information from the table Retrieve information…
-
0
votes1
answer229
viewsState returning Undefined
I’m not much for asking, right, but it’s keeping me up at night... I have the following function to format dates const DataFormat = (props) => { const data = props.split('T'); const [year, month,…
-
0
votes1
answer75
viewsCancel Fetch Using Componentwillunmount in React JS
Good evening. I’m having doubts about such a life cycle method of React and I’m doing tests. One of them is to cancel a request fetch, however, I’m not getting it. The console log. appears, but the…