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
votes3
answers275
viewsNode App React Native Error
I am unable to create new project Whenever I run the command: React-Native init Myproject it cannot complete the creation of the project. Follow picture:…
-
0
votes1
answer78
viewsHow to remove an item dynamically from an object?
I’m using a state of reducer, containing an object in this format: x = {10: {nome: 'lucas'}, 20:{nome: 'beraldo'}} <br/> And, I get an id via action. I’d like to do something like…
-
0
votes1
answer1659
viewsReact dynamic array in imgs
I have the following function to create dynamic array. funcListMap(_ref) { let list = []; _ref.map((i) => { list.push( <ListItem key={i.id}> <h1>{i.id}</h1>…
-
0
votes1
answer77
viewsUse of React in backend and small projects
You can integrate the React application with some back end language? I can apply React to small projects or only when needed? React came to break the standard web development paradigm, where I…
-
0
votes1
answer132
viewsUpload a local image inside a webview
I have a component WebView who carries a String HTML, the problem is I can’t carry a local image inside that WebView. The image is inside the folder '../img/imagem.png' and when I place this…
-
0
votes2
answers153
viewsReact-Native incompatibility 0.55.4
react-native init --version 0.55.4 aplicativo I used version 0.55.4 because the current version is giving error 500 npm install firebase --save I used these two commands on the console, and went to…
-
0
votes1
answer1187
viewsHow to get json data with React, fetch and Rest api?
I’m doing some studies with React, and for that I’m pulling a JSON from Restapi Wordpress. When I put something like fetch("https://pulsemaker.com.br/wp-json/wp/v2/posts/179") It works just fine,…
-
0
votes0
answers31
viewsProblems to use system developed in React on Apache
I created an application with React, and when I finished developing npm run build, I played the app on the Xampp server to test, but when access to the system by the Xampp server appears: My App…
reactasked 6 years, 1 month ago Rodrigo Jacinto 355 -
0
votes1
answer1034
viewsPass match.params into another component
I have the following problem: I have a step component and inside that component I have another component called form that renders one of the step steps. Well, on step I can get the id passed with…
-
0
votes0
answers104
viewsHow to pass variable in require
I am trying to pass a variable populated by the database, containing my route to require, but is giving the following error: "Cannot find module 'views/Cadastros/Usuario'" And these are the ways I…
-
0
votes0
answers53
viewsChild object appears as 'Undefined', but an object’s previous level shows the value
The field this.props.usuario.user.guia is as undefined, but when I log the object this.props.usuario.user appears with value. It makes no sense to me. Log code: if (!this.props.usuario.logout) { if…
-
0
votes0
answers143
viewsTag scripts in React
How do I put javascript tags in React? I have this tag to put on a project <script data-cfasync='false' type='text/javascript' src='link'></script> It’s an ad tag. Browser works.…
-
0
votes1
answer52
viewsSort followed by map not working in React
I have an array of objects and am trying to iterate with the map in that array after the method of sort, but it is iterating in the normal array, disregarding the method sort and the reordering.…
-
0
votes1
answer1106
viewsUrl query Reach Route - React
I have the following problem: I have an API in Node.js that returns me id and name of products and supermarkets When I get into /supermarkets via params url /:idSupermercado I can get this parameter…
-
0
votes1
answer50
viewsDetect clicked TR go through REACT function
How to detect the TH I clicked and pass parameter in React? I wanted to make an ordination, but I’m having a hard time getting past a parameter in a TH function that I clicked, can someone help me…
-
0
votes0
answers22
viewsReact&redux - Feathers-Rematch snapshotPlugin error
I am assisting in the development of an "APP" using Reactjs and Redux, Feathersjs... The whole project runs 100% on the Mac, but when you do git pull and run on Windows the project has a snapshot…
-
0
votes0
answers51
viewsjQuery with Angular and React
I started studying Angular and React recently and I have a question for those who are experienced with these technologies. Using them together with jQuery is inappropriate?
-
0
votes1
answer190
viewsRound up JSON value
In my code, I receive a JSON with a value (Example: 6647), and I would like to round it to just 1 decimal place. In the code, I take Json’s content by the call: render(){ return( <div…
-
0
votes1
answer1645
viewsThe "npm run build" command is not working
My problem is the following when executing the command (To prepare the files for production): npm run build He doesn’t make any mistakes, apparently everything worked out:…
-
0
votes1
answer265
viewsSend Object Array to Bulkcreate
I’m using Node JS (backend) with sequelize 4.4.2 and I need to send an array of objects from my front (React JS) but I can’t generate in the format that is expected, only to comment when I did a…
-
0
votes1
answer1118
viewsReactjs Private Routes and React Router
You can implement private routes by receiving a JWT token in the header and body information in Reactjs with React Router?
-
0
votes0
answers303
viewsProblem to save image to Node and React
I am trying to upload images to my server using Node and React, however, when trying to upload, it generates this message: Not allowed to load local Resource:…
-
0
votes1
answer215
viewsuse of Drawer in the React/material-ui
Good night. I’m a beginner in React and I’m trying to apply a Drawer to my project, but when running it on the localhost Drawer isn’t working and I’m getting the following errors: 'handleToggle' is…
-
0
votes0
answers153
viewsHow to request PHP and BD files on the same server created by React-app
I’m learning how to use the React Framework. In the sending part of form data, and recover this data, I am using ajax with the function of jQuery. componentDidMount() { $.ajax({…
reactasked 6 years, 10 months ago Rodrigo Jacinto 355 -
0
votes2
answers55
viewsHow do I set the state with local dynamic json?
How do I place json data within the "recipes[]" array that is in the state? import recipes from '../receitas/recipes.json' constructor(props) { super(props); this.recipes = recipes.results; //json…
-
0
votes1
answer220
viewsError while installing React
I’m trying to install react but when I enter the command: npm install -g create-react-app it returns me an error Please help me understand why I get this error…
-
0
votes1
answer129
viewsError in Muithemeprovider
Good evening, I’m facing a problem in a React project. When executing it, I get the following error: "Failed prop type: The prop 'Theme' is marked as required in MuiThemeProvider, but its value is…
-
0
votes1
answer261
viewsTabbar React Native
I’m having trouble positioning a component of tabbar what I’m doing. Home js. import React, {Component} from 'react' import {View, Text, ScrollView} from 'react-native' import Header from…
-
0
votes1
answer1792
viewsCarousel in the material-ui
How to do the carousel of images in the material-ui? I’m using this library along with React for front-end.
-
0
votes2
answers1259
viewsUnexpected token - React
I am trying to run a project, however it is displaying an error in the console related to a function I have, the error is as follows: "63:25 error Parsing error: Unexpected token, expected (…
-
0
votes1
answer459
viewsHow to pass props through the router React
How to pass props through the <Link to=''> I need to get the information from another component
reactasked 5 years, 7 months ago user144382 1 -
0
votes1
answer28
viewsForce class in React to use Arrow Function with Eslint
How do I make an error pro Eslint when someone in the project uses functions within a class that need bind instead of an Arrow Function
-
0
votes2
answers1389
viewsHow to put the image address in src without it having to be a Component in React
Good evening I have a js file with an array of objects and one of these properties is image as I do to render it in src already tried {item.image} but it’s just a string and React apparently uses…
-
0
votes1
answer133
viewsReference in the mongodb
Well, guys, I know there’s no such thing as a relationship, but I need to know how to do something related. I have two collections a call, Extinguisher and the other Historical, I want an extinct…
-
0
votes1
answer565
viewsNodejs, express, browser does not find files
Good afternoon guys, I made an API with Node and I consumed it with React, in development environment, works OK because I start one independent of the other, but in production I’m trying to deliver…
-
0
votes1
answer80
viewsUsing Provider in the Reactjs Context
I’m trying to use the Reactjs Context but I can’t get the Provider to assign the value to the context variable. whenever I check the empty variable. Context: import React from 'react' const…
-
0
votes2
answers13140
viewsReact Native - Pass data to another component
I’m having a question, I’m starting with React On and I’m building an app that contains some components and uses React-navigation. The doubt is as follows: From this component that renders several…
-
0
votes1
answer39
viewsReactjs doubt about nomenclatures
Hello, I am studying Reactjs and I have a question regarding the nomenclature of functions. I see in the tutorials and in the post the staff always put: handleClick; handleSend What is this Handle?…
-
0
votes1
answer56
viewsImport Once Javascript
I have two components in my Reactjs project, which use google recaptcha. However, as there are two, each time I call him it’s as if he understood that I wanted to load the "import Recaptcha from…
-
0
votes0
answers237
viewsProject in React doesn’t open on Apple devices
I have a project done with React using Webpack for frontend and Spring Maven for back. I am using JSX files and as a framework Ant Design. The problem is in the fact that on Windows and Android, the…
-
0
votes1
answer29
viewsHow to iterate a url in Javascript
I have a tag img and I need to iterate the src, altering within a map to uri. ex: ../assets/images/personagens/${index}.jpg, whose index is the parameter of the map, however the javascript does not…
-
0
votes0
answers1104
viewsHow to resolve Typeerror: Cannot read Property of Undefined
I’m getting Typeerror: Cannot read Property 'nextpage' of Undefined when I try to use the already set value of the page to receive a new paged result. In case I can read the value the first time,…
reactasked 5 years, 6 months ago Tiago_Albuquerque 80 -
0
votes1
answer546
viewsRender components according to route
I am developing an application with React. I have the index.jsx file below: import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { store }…
-
0
votes2
answers1964
viewsHow to delete an element by Key in React?
This is the code generated, because the list is created by the routes of the pages, I would like to know a way to delete a specific Navlink, either by key or otherwise definitely, this Navlink…
-
0
votes1
answer168
viewsCustom style for React ui material
I’m trying to use a custom Component, as the code below, but the same is giving error, someone can give me a light of why is the error happening? import React from 'react'; import {withStyles,…
-
0
votes0
answers95
viewsProblems with React cache
I’m having problems caching in React On. When I upload an image to the server, it’s all right. The image I saved appears on the App home screen. But when I put another image in place, this new image…
-
0
votes2
answers209
viewsbind( ) in Javascript / React - Doubt
why do I necessarily need to bind() a function within a constructor? type: constructor (props){ super(props); this.funcao = this.funcao.bind(this); } Couldn’t do this bind() without the builder?…
-
0
votes2
answers121
viewsWhy do I need to use a constructor to create my style variable?
import React, {Component} from 'react'; import {StyleSheet, TouchableOpacity, Text, View} from 'react-native'; class Botao extends Component{ this.style = StyleSheet.create({}); // ESSE CODIGO TA…
-
0
votes2
answers412
viewsReact onChange is not firing
I have the following code: handleChange(event, module) { this.state[module][event.target.name] = event.target.value this.forceUpdate(); } render() { const handleChange = (event, module) => {…
-
0
votes1
answer51
viewsHow to treat values that comes in this.props in React
I have a Semaphore component that calls the Light component 3 times each with its parameter <div className="compSemaforo"> <Luz color="red" /> <Luz color="yellow" /> <Luz…