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
votes2
answers33
viewshow to display keys in the browser?
Hello, I want to display a word but with "{}" example {word} follows part of the code in question function LogoCovid() { return ( <LogoStyle> Dev {palavra} </LogoStyle> Citation I have…
-
-1
votes1
answer736
viewsTypeerror: Cannot read Property 'navigate' of Undefined
I can do the navigation of my page of Main for page Home but I can’t do Home for Athletes, where the configuration ta equals. I’m using a guy in the middle, so it would be from my page Home I call…
-
-1
votes1
answer310
viewsYarn Doesn’t Start Development Server
Hi, I’m developing a site with React, but when using give command yarn start, he doesn’t incite my server.…
-
-1
votes1
answer543
viewsShortcut to create structure for a React component in Vscode
I wonder if there is a shortcut in Vscode to automatically create the structure of a type component: const { render } = require("react-dom"); import React from 'react'; import Time from './Time';…
reactasked 4 years, 1 month ago Tiago Almeida DEVELOPER 1 -
-1
votes1
answer24
viewsHow to use a repository like Package?
I started a project with create-React-library and made several customizable components with TS. A kind of Material UI. But this project cannot be public access. I previously wanted to post on npm, I…
-
-1
votes1
answer71
viewsIf validation to check if value is Undefined
I’m having trouble checking if the value is undefinded. I need to make a if for this validation, follow my code: My interface: interface IModalContatos { dados: IContatos | undefined; onSave:(dados:…
-
-1
votes1
answer71
viewsRemove All from a list
My function of removing All is only removing the first Element that has been added to all. const handleRemoveItem = useCallback(() => { setTodos(todos.slice(todos.indexOf(+1))); }, [todos]);…
-
-1
votes1
answer78
viewsDevelopment environment for Reactjs
I use the Visual Studio with Asp.Net and C# a few years ago and now I’m finishing some courses Reactjs. But I’m having difficulties with the development environment. None of the courses used the…
-
-1
votes1
answer19
viewshow to fetch data from an Api with React
I am trying to display properties of an api with React but get the following error: notice that on the right the property exists is I call it below:…
-
-1
votes1
answer39
viewsCSS does not load into static build (next export)
I’m using Yarn create next-app, for my first site project on React. So I used export to generate the static site and moved the "out" folder to the server to see the result. But apparently all the…
-
-1
votes2
answers36
viewsHow do I check if the object has a specific name string in Reactjs?
I want to render an image only if my object has the "happy" property, so play the image I want only if this is the string. My object is an API Example: api = { type: "happy" } someFunction(){…
-
-1
votes1
answer289
viewsLoad route by clicking on the menu inside a component (Dashboard)
Now I’m using the Adonis (I love the Laravel) and doing the Reactjs case here on the blog. more I came across the following situation: I have an admin Dashboard, where the same has: Header.js…
-
-1
votes1
answer30
viewsSelection of two files with Input type file
I have this following situation, I have these two files to upload with input type file. But here’s the rule. I can only present to the user the files that have the SHP extension Where it can select…
-
-1
votes1
answer12
viewsHow to pass parameters through the Link in React?
How to pass a parameter using Link? In case I want to pass inside the Link the ID of my product to recover this value in my other component. But in the to="" i can’t pass the value in JSX. In case I…
reactasked 3 years, 3 months ago Toquinhoro 11 -
-1
votes0
answers5
viewsHow to import a React component with Styled-Components in next using monorepo?
I’m using monorepo with Lerna and Yarn workspaces in a nextJS project, I can run the project but I can’t reuse components when I put Styled-Components in them. There’s always a mistake: Module parse…
-
-1
votes1
answer21
viewsIs it possible for a component to have a map that changes the return according to the prop that was passed?
<tbody> {props.item.map((film) => ( <tr> <td>{film.name}</td> <td>{film.mass}</td> <td>{film.height}</td> <td>{film.birth_year}</td>…
reactasked 3 years, 2 months ago João Amaral 3 -
-1
votes0
answers23
viewsNewline required at end of file but not found
I started a React project using Eslint. However, it is giving this error: Failed to compile. src/index.jsx Line 5:59: Newline required at end of file but not found eol-last Search for the keywords…
-
-1
votes0
answers8
viewsHow do I validate Time with Regex in Reactjs?
Basically I want to do a validation using regex... const regexTime = /([01][0-9]|2[0-3]):[0-5][0-9]/ ...to validate a field when some information is entered
-
-1
votes1
answer49
viewsHow to specify only one element in onMouseEnter functions in REACTJS
I need to make that when we pass the mouse (Hover) on a link, it is shown only one object, not several. My code below: import React from "react"; import { NavLink } from "react-router-dom";…
-
-1
votes1
answer70
viewsProblem in setar performance token
I’m having trouble authenticating my application, I do the process of inserting a token jwt to the user login, but I can’t make the application read the token or I’m losing you at some point, Repo…
-
-1
votes1
answer113
viewsHow do I open a modal with youtube video with different video`s?
Look guys, I’m developing a website with all my portfolio and in it will have some videos that are on youtube. At the event Onclick opens a modal with the video, pulling his ID through the video. I…
-
-1
votes1
answer3765
viewsObjects are not Valid as a React Child (found: [Object Promise]) [REACTJS]
I am making a list of items that has a foreign key (om_id) . When retrieving this list I would like that instead of loading the value om_id, the value of the Name of this OM table. By rendering my…
reactasked 5 years, 3 months ago Damasio Ferreira 3 -
-1
votes2
answers520
viewsFunction with React Native parameters
I got my construtor: constructor(props) { super(props); this.state = { categorias: [], refreshing: true } this.buscarSubcategorias = this.buscarSubcategorias.bind(this); } And the function:…
-
-1
votes1
answer349
viewsnpm ERR! code E405
While trying to install dependencies in my project, I get the following error message: I typed in npm i --save-dev [email protected] I received the above error. Same with other…
-
-1
votes1
answer221
viewsRedux Saga function is not being called
I’m having a problem with Redux Saga. The request is coming in the action and the Return but does not go through Saga. I’m starting in Saga so I can’t identify what the problem is Action: export…
-
-1
votes2
answers553
viewsReact Hooks state does not update
I am facing a problem with upgrading a State using React Hooks. The problem is that subsequently the application of a .filter() I try to apply the resulting value of the filtering performed in a…
-
-1
votes1
answer75
viewsUsing useState in React but not as I imagine
From what I understand useState, is using within the same function to update variable or html component within the same function. What I need is: I have a form and in it I need to call methods in…
-
-1
votes1
answer264
viewsPassing props between components
Good morning, in a scenario with 3 components, being Casecard, Casepage and Portfolio, where Casecard is a card that I declare within Portfolio with the image, title and description that I want, and…
-
-1
votes1
answer94
viewsHow to pass values up in a tree in javascript
Hello, I’m doing an exercise that consists in making an algorithm that plays the game of old, so far I managed to generate all the game paths and detect which lead to victory or defeat and organizes…
-
-1
votes1
answer118
viewsBug list of React users
I’m trying to list a list of users of the database, but it does not load when starting the application and not even if I update the emulator of android studio by pressing 'RR', already tested on my…
-
-1
votes1
answer267
viewsLogin with CPF with Nodejs, Reactjs and Mongodb
Well I built an API for registrations in the remote mongodb database (Atlas), I can register, the intention is to offer a form for the user data(Name, Cpf, phone) and then do the CPF, made the login…
-
-1
votes1
answer217
viewsAre there any devaluations of creating a component in React per function instead of Class?
There is a downside to creating the components in React by function instead of class? In the case of Class, the component does not need to have an ID to be accessed internally and change its…
-
-1
votes1
answer530
viewsError trying to run React-Native run-android
I am starting now at React and have created a React Native project for study. When trying to run with 'React-Native run-android' it trims the error below. Can anyone help me? I don’t know how to fix…
-
-1
votes1
answer224
viewsReactjs - How to call the state from an input to another Class
beauty? Well I am a layman in Reactjs, I am learning and at the same time using for work and so I have the following problem: I have a checkbox that if it is checked a button of another component…
-
-1
votes1
answer35
viewsHow to fetch next pages until they run out
Good afternoon. I have the following code import React,{Component} from 'react'; import './App.css'; class App extends Component { constructor(){ super(); this.state={ pokemonList : [], count : 0,…
reactasked 5 years ago victorgvargas 33 -
-1
votes1
answer152
viewsDoubt in error . map is not a Function
I created a table with 5 dropdowns, each one receiving its content from an api. But sometimes when the page reloads I get the error "filterL" is not a Function,in case it happens to any of . map I…
reactasked 5 years ago Gabriel Midão 85 -
-1
votes1
answer174
viewshow to render data from an API in Reactjs?
Sorry, guys, I’m very new to programming and I’m doing a project for a college. I managed to connect the api, I can bring the object from there, but I can’t render this data that is returned, I’ve…
-
-1
votes1
answer4512
viewsGet value from an input type='text' React
I am trying to redeem the value of an input type text. I’m doing it this way: class CreationGroups extends React.Component { constructor(props) { super(props); this.state = { value: '', };…
-
-1
votes1
answer49
viewshow to display information by params of an object array in a component in React JS
I have two files, Listcurses and Cardcurses, in Listcurses I have an array of objects and I’m trying to perccorer and display the information in another component (Cardcurses) by props, but the page…
-
-1
votes2
answers168
viewsReact Native: Component does not find state data after setState
I’ve had this problem for weeks: I am using React Hooks to request an internal api using useEffect to make a request and then store the result within a setState. If I give a console.log the first…
-
-1
votes1
answer397
viewsThis is Undefined in React Hooks
Hello, I’m creating a JS system using React Hooks, but I came across a problem when I use <Route exact path ="/produto/:idProduto" component={Quiz}/> we were able to capture the id with const…
-
-1
votes1
answer102
viewsHow to create a container component from other components
Good afternoon! I’m trying to create a component that contains Ivs that stylize the components inside. Only there are 3 Ivs and I don’t want to replicate them every time I go to use, so I thought of…
-
-1
votes1
answer827
viewsundefined is not a function-Undefined is not a Function/React Native
I’m having a problem, I’m taking a course and is giving this error in React Active, I’ll show you all the code below, can anyone help? I searched about but found no answer That is the mistake:…
-
-1
votes1
answer168
viewsError trying to log in with React and Redux Saga
I am trying to make a request to pick up session in an API, it is with the Oauth2 system, where I have to send a form-urlencoded with some data and it returns me a token. But I can not do the…
-
-1
votes3
answers534
viewsUsing Dashboard Bootstrap Theme with React js
Good afternoon Personal, I’m new to React js and would like to know how I could use a Dashboard bootstrap theme that uses local Imports of css and js files located in the "Assets" folder of the…
-
-1
votes1
answer34
viewsImage does not get larger than 40x40 pixels
I’m studying reacti Active and I’m trying to show an image in a location on the map. When I adjust the width and height of the image, it ends up being "cut" when it is larger than 40px. I am using…
-
-1
votes1
answer26
viewsRender multiple components based on a number
I have a component in Reactjs and need to render the component <FaRegStar key="1" size="30px" /> map-based list.stars. I don’t know how I could do that, someone could help me? const User = ()…
-
-1
votes1
answer105
viewsHow to take all pages of an API and show all data at once on screen using React Hooks?
Hi, I’m studying React Hooks and as a base I’m using a Rick and Morty API to show the characters on the screen https://rickandmortyapi.com/api/character/ However, it only shows twenty characters per…
-
-1
votes1
answer227
viewsAlign Navbar Bootstrap-React
I’m trying to align the navbar to the right, however, unsuccessfully, is like this currently: index js. import React, { Component } from 'react'; import 'bootstrap/dist/css/bootstrap.min.css';…
-
-1
votes1
answer438
viewsHow to enable CORS in Java projects with JWT implementation?
I am doing a web service project, where I implemented the JWT and to consume using Reactjs I enabled the CORS, but when I make a request that needs to have the token, this returning it: Access to…