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
votes1
answer153
viewsReactjs Components - Button/rendering problem
I have a Componente Button and the same is found within another componente Main. My purpose was that by clicking on this componente Button, it was alternating between other visual components inside…
-
-1
votes1
answer2942
views(React Native) Typeerror: Undefined is not an Object (evaluating '_this.props.navigation')
I can’t fix this mistake.. someone help me I click the button to go to another page and it appears.. follows the code: [This is the code of the menu component, it has a list of buttons with this…
javascript react react-native react-navigation react-routerasked 4 years, 9 months ago miguelrisquelme 9 -
-1
votes1
answer132
viewsHow to view the "id" in Json (api)
I am developing a project in React and I came across a problem, I made a map in a list that works correctly, IE, if I add the objects in the api it appears on the screen, but I would like to create…
-
-1
votes1
answer172
viewsMy useSelector variable is printing Undefined even when Reducer has returned the value
I have this saga that performs an http request and performs a Dispatch on my Reducer: // worker Saga: will be fired on GET_FILIAIS_REQUEST actions function* fetchFiliais(action) { try { const data =…
-
-1
votes1
answer50
viewsReactjs props for others
Good afternoon, am with a beginner question I would like to know if anyone can help me doubt is the following need to pass the active that is selected in Navbar.js for Home.js to be able to render…
-
-1
votes2
answers2609
viewsError running npm start (React)
I was developing a React project for web, everything normal, and without explanation the next day I could no longer run the application with npm start or yarn start. Follow my package.json and the…
-
-1
votes1
answer107
viewsHow to catch a child object using Axios?
I’m making a website using React. When I run the GET method, I get the following result On the front, the code is like this: import React from 'react' import axios from 'axios' export default class…
-
-1
votes1
answer2457
viewsBlocked cross-origin request - JS/CORS/AXIOS
I am using an API (Axios) to connect my application backend to frontend, however, I am not able to give POST (register a new record) on one of the pages because Mozilla Firefox blocks cross-origin…
-
-1
votes1
answer227
viewsuseState does not update
I have a function that fetches user information in an API and stores it in a useState, would like to know if I put a console.log to see if stored the data correctly in useState returns me empty but…
-
-1
votes1
answer401
viewsAccess another navigation page using nested navigation
I am trying to access a page, in React-Native, which is on another route and is occurring the following error: "The action 'NAVIGATE' with payload…
-
-1
votes1
answer49
viewsI want to search a file with the value of a variable
I would like to find an image with the variable value valor, function-generated getRandomInt(), which generates a random number between the max and the min. My goal is that each time the user…
-
-1
votes1
answer187
viewsCache Redux Store state
Hello, I’m new to the whole issue of React and Redux so I wanted a little help. I made a simple code: home js. import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'…
-
-1
votes1
answer336
viewsModify only one React Hooks component
Hello, I’m running a simple application on Reactjs. I created some check buttons, which when clicked changes color, but I press these buttons on a map and when I click to change the color of one,…
-
-1
votes3
answers429
viewsError installing npm install @React-navigation/stack -> expo start Disconnected
I’m new to React Active and I’m trying to install the React navigation stack using the npm install @React-navigation/stack command to use in an app project with React Active, however after running…
-
-1
votes2
answers465
viewsHide a Navbar item in React JS according to the page
I am new to using React, I took courses in Alura, but many doubts remain because it is something very new for me. I have a login page, this login page is using a Header that is used in all other…
-
-1
votes1
answer71
viewsDispatch Drawer does not work
am trying to implement a Drawer in my app. As I want only in one of my screens. While trying to implement, I felt some difficulties. So I did step by step not to get lost. I created a button and I…
-
-1
votes1
answer94
viewsPass props to React grandson component
I have 3 components, Login, Loginpresentation and Cpfpresentation. Login is the component where I contain all the logic and that call the respective "... Presentation", Login and Cpf Presentation…
-
-1
votes1
answer49
viewsMap 2 jsons and render in 1 card component + date formatting
I would like a help: I have two Json: posts and Author. Json posts returns right in the log. Each post has a respective author. It’s already showing the cards with the right post, but I also need to…
-
-1
votes1
answer24
viewsReact: How can I send data to this.state
Good evening, I’m starting in React and have the following line: class Namelist extends React.Component{ constructor(props){ super(props); firebase.initializeApp(config); this.state = { clientes: []…
-
-1
votes1
answer184
viewsHow to handle Node error response in React
Guys I started Act and recently I looked for various ways to treat the error but I do not understand why it does not work. I tested the Node in the isomnia and it’s all ok, in React I get the answer…
-
-1
votes1
answer417
viewsCheck User login React Navigation
In the React Navigation 5 no longer exists the Switch Navigator. In Upgrading Doc the proposed solution to prevent the user from going back to the login screen is this if ternary that checks if the…
-
-1
votes1
answer117
viewsAssigning Style CSS to brother component (active)
How to make calling the action . Burger:active change the style of the menu component on the same hierarchical level Components/Nav/index.js import React from "react"; import { NavContainer } from…
-
-1
votes2
answers199
viewsHow to request and update a status before render
I’m making an application and was creating a Privaterouter. Since I am using a Fake API (hai-server) it generates me a token on login and I can block calls from some routes if I do not pass this…
-
-1
votes1
answer82
viewsShow button only from a specific <li> button
I am developing a web application where this green confirm button shown in the image, is only displayed when the blue edit button is clicked. These "cards" are li’s that are generated dynamically as…
-
-1
votes1
answer229
viewsUse more than one function in the Get Method route with Node.js
Good evening, I’m starting to learn about Ode and React.js and I’m having a problem because I need to use more than one function on the same route and by get method. I did the code below, it’s…
-
-1
votes1
answer31
viewsre-act giving error
I am making a form in React and this giving this error ''' ''' TypeError: Cannot read property 'name' of undefined UserCrud.updateField 48 | 49 | updateField(event) { 50 | const user = {…
-
-1
votes1
answer39
viewsGoogle maps addListener using React
I need to add the dragend event to get the center of the map google.maps.event.addListener(map, 'dragend', function(evt) { console.log(map.getCenter()); }); however do not know how to make this…
-
-1
votes1
answer235
viewsHow to view value saved by Asyncstorage?
I have a code that saves and reads the value of a state through Asyncstorage, but when closing the app or changing the screen the value goes back to the value of the original state, which in my case…
-
-1
votes1
answer52
viewsProblems with React-router-dom Withrouter
If you turn on, I started making an app and I needed a header menu for the transition, this would be a menu that is rendered on every page. That is why it was created and is ultimalized outside the…
-
-1
votes1
answer190
viewsHow to instruct Eslint to solve absolute paths with Babel-plugin-root-import in monorepos
I own a repository monorepo done with Yarn and in this I have a project frontend created with the command create-react-app. I installed the libs React-app-rewired and customize-Cra to inject the…
-
-1
votes1
answer127
viewsHow to render a modal on a map using React?
I have an application in React that searches products of an api, I want to render a table where each item has a button that opens the modal and updates (sends a PUT in the API) the product. Only the…
-
-1
votes1
answer2287
viewsUnhandled Promise rejection typescript and Node.js
Good night to you all! I am developing an app with React, Node and typescript and was programming a route with post method for inserting data using sqlite database and testing in India but when…
-
-1
votes1
answer133
viewscannot read Property 'Join' of Undefined - React
I’m getting this problem when I try to submit a form with React on the front and Node on the backend. This form registers a store. When clicking save, he was to take the categories of the store and…
-
-1
votes2
answers271
viewsgetElementById in React/JSX
I started my React studies yesterday so I don’t have much knowledge about, and I’d like to know how to give a document.getElementById() in React/JSX, how do I do this? I tried to use…
-
-1
votes1
answer134
viewsError in call of Arrow function on button - React Native
I want to call the clearMemory function by the "AC" button but I’m not getting it. Follow the reference code: export default class App extends Component { state = { displayValue: '0', } addDigit = n…
-
-1
votes1
answer60
viewsNot returning HTML in React
Guys I’m doing Omni Stack 9 from Rocket Seat, where Diego teaches to develop a copy of Airbnb but for Devs. I’m doing the Web part and I can do even the quiet login page, is redirecting to Dashboard…
-
-1
votes1
answer405
viewsReact with Typescript : Error on a map in the image array
Interface: interface CompanyDetails { company: { id: number; name: string; description: string; whatsapp: string; instagram: string; email: string; }, filesCompany: [ { url: string; name: string;…
-
-1
votes1
answer280
viewsHow can I separate a button and a text field into components - React JS
I’m starting with ReactJS and I decided to separate some parts into components, a <botao /> and a field to write. The application you are creating is simple, is a field to write with two…
reactasked 4 years, 4 months ago Guilherme Ramos 55 -
-1
votes1
answer47
viewsHow do I automatically update a state in React Native?
I am new to React Native, I am developing an app for TCC and my idea is to develop an app that will help elderly people or any group with difficulties to learn a little bit about the world of…
-
-1
votes1
answer86
viewsInserting elements at specific array positions
Good night, I’m trying to interface a room system using React, 8 people can enter each room. I return the users contained in the API room, but I also wanted to indicate the empty spaces of the room,…
-
-1
votes1
answer1041
viewsTake data from an editing form - React
I’m developing a single page where I can edit a user’s data, but I had problems developing with Formik, I didn’t have much choice, since it is better in many ways. So I tried to use it and I was…
-
-1
votes1
answer236
viewsNext.js-getStaticProps fetch dates
I’m having a problem with the getStaticProps in the Next.js, my code requests information from an API created by me, just using it on a particular component that does not return any. the following…
-
-1
votes1
answer128
viewsReact-JS -useState, useEffect
Good afternoon guys, I have code where I am using a class for the status of my application. It is a simple application only at the level of study. In the application I am calling an external api…
-
-1
votes1
answer80
viewsLogic problem - React does not calculate
I’m starting with React now, and I had an exercise to do, the exercise consists of "draw out" multiples of 5 from an ATM, but I forgot something in the code, because when I click to calculate, just…
-
-1
votes1
answer166
viewsHow to change the value of an object within the array with Formik and Yup?
Here I create the initial values of Shape: const defaultFormShape = { name: '', email: '', group: { id: '' }, addresses: [{ name: '' ]} }; And here I validate Schema: const validationSchema =…
-
-1
votes1
answer30
viewsHow do I stop via a button in the "Menu.jsx" component, call a Dialog within "Register.jsx"
Personal talk, I set up a page that has a menu (inside the file "Menu.jsx"), in this menu has a button, I want to open a "dialog", like a pop-up to register notes. This dialog has its own file…
-
-1
votes1
answer51
viewsI cannot bring json information to html
I’d like to get the names of the Pokemons and the images. I use the following code: import React, { Component } from 'react'; import api from "../../services/api"; import './styles.css'; export…
-
-1
votes2
answers225
viewsHow to automatically select a select item in React
I’m developing a sales record using React and Node. I have an "Edit" button where I call a function that receives an already registered sale and fills the fields for editing, the fields "Sold Hours"…
-
-1
votes1
answer124
viewsHow to take position 1 of the array and add?
I am building a menu screen, currently I have an array of items and prices that the user selects. I’m showing them on the screen normally. But I need to capture the price of each item, and in the…
-
-1
votes1
answer28
viewsHow to pass Form via URL
Hello, I’m new to React I have a Home Component that has a Form I would like to know how to get the inputs of this form and pass via get to another component: On routes I passed like this <Route…