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
votes1
answer254
viewsBlocked cross-origin request when creating a box
Hello I’m starting in React and I came across a problem, I’m trying to make an app similar to Dropbox, on the main screen you create a box and can upload files, but when I click create this message…
-
0
votes1
answer439
viewsHow to Fill In My Fields with Data Selected by Picker and Update Data - React Native
How can I make so that when the "title" of the task is selected through the Picker it fills my other fields belonging to this task and can update my data? thanks for your help ;) export default…
firebase react react-native firebase-database reactive-programmingasked 5 years, 7 months ago Nuck 35 -
0
votes0
answers30
viewsDifference between a constant that receives a function, and a function
What is the difference of using const teste = () => { } or function teste(){ } inside React? I see some codes that use the const and others that use the functions, but from the tests I did, both…
-
0
votes0
answers14
viewsHow to redirect to another page after an animation in React and typescript
I’m trying to send the user to the login page after an initial animation that takes 2 seconds to run, so I did a 3-second setTimeout to redirect to the login page. But it says that the web page…
-
0
votes2
answers160
viewsError rendering Sectionlist React Native
I am having the following error in React-Native when trying to mount the component being passed from one screen to another. Below is the code to better understand the procedure. Code that searches…
-
0
votes1
answer900
viewsHow to Fill in My Fields through My React-Native and (Firebase) Database
How to Fill my Textinputs through my database so that the User can edit them and insert them again (replacing the old ones) for example:(take my email and password I have in BD and put in these…
-
0
votes4
answers444
viewsNavigatdraweror does not work
I performed the configuration of Drawernavigator on with the React-navigation 3.x, it seems the code is correct, but it just doesn’t work, so I swipe the finger through the screen it just doesn’t…
-
0
votes0
answers10
viewsCan you reference one component within another in Styled-Components?
There is the possibility of doing something of the kind in Styled-Components? export const Componente1 = styled.div` background-color: #fff; `; export const Componente2 = styled.div` Componente1 {…
-
0
votes0
answers15
viewsHow to load an application dynamically with React
When we build a SPA in React, the code is all in memory, all parts of the application are in a single file. How can I split my SPA to be loaded as the user uses the features, for example: load the…
-
0
votes0
answers3
viewsSave build folder of a React project running with Docker
I already have a React project running on Docker, but I need to deploy it to S3 So I don’t have a server where I can run Docker. The process I do today is to run npm run build on my machine,…
-
0
votes0
answers16
viewsReact, Vue or angular
need one of the Vue or angular React framework or have how to do everything without it another detail, I can use the nodejs libraries without the above framework another detail, out of these 3 have…
-
0
votes1
answer91
viewsHow to insert span HTML elements into React object?
That is the code import React, {Component} from 'react'; const content = { title: `Cl<span className="mask">i</span>entes`, description: 'Veja abaixo nossos clientes!' } export default…
-
0
votes1
answer41
viewsReact Activate Swiper does not change activeDot
Good afternoon, I am creating a list with Swiper but after rendering it does not change the activeDot var obj = -1 const render = _.map(this.state.arrayFavorites, (itens) => { obj++ return…
-
0
votes0
answers10
viewsAxios - Server Error Error: Request failed with status code 404
I’m having a problem, I’m doing an authentication but this giving Error: Request failed with status code 404, and I don’t know what’s wrong with the url. import axios from "axios"; import {…
-
0
votes4
answers580
viewsReturn Asyncstorage value in a constant
I’ve been trying for some time to return an item stored in the Asyncstorage of React Active, but the return is always a Promise, but what I want is to make decisions with this return later, and be…
-
0
votes2
answers2480
viewsReact JS + PHP help
Well I’m having difficulty and I haven’t found a solution yet, wanted to develop a crud using Reactjs + PHP + Mysql; I made a php file that returns a JSON object so I can access it from React.…
-
0
votes0
answers106
viewsHow to integrate jquery-ui with React?
I am doubtful... I would like to integrate the jquery-ui with React... I am creating a calculator and do not know how to make it move on the screen. I’m trying to collaborate with free software and…
-
0
votes0
answers2099
viewshow to make a simple shopping cart with React js
i would like to know how to make a simple purchase addition in the js React showing the amount of items added in a div and the calculated price whenever adding a new item, I already downloaded other…
-
0
votes1
answer553
viewsReading of Firebase data
Whoa, that’s all right? I’m doing a college project using the Firebase and the React Native. I developed a screen where I want to publish texts and show everyone who is using the application. I was…
-
0
votes1
answer864
viewsReactjs - Typeerror: Cannot Convert Undefined or null to Object
Good afternoon, I have a component where I consume data from an API, so far so good! I am trying to add a reactstrap modal and am facing the following error: Typeerror: Cannot Convert Undefined or…
-
0
votes2
answers608
viewsError installing adonisJS
Hello I’m trying to install Adonis but it’s giving error (I’ve checked with sudo npm i -g @adonisjs/cli): gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir…
-
0
votes1
answer225
viewsReactjs - Catch exported constant
I created a component that exports Axios: import axios from "axios"; const token = 'Z31XC52XC4'; export default axios.create({ baseURL: 'https://xxxxx.xxxxx.com.br/api/', headers: { 'Accept':…
reactasked 5 years, 5 months ago Edinho Rodrigues 384 -
0
votes1
answer293
viewsUse of State and setState React Native
I’m trying to create the variables that will receive the User and Password data,I tried several ways using state and setState, but the way I built my application I’m not getting. Thanks for the help…
-
0
votes1
answer456
viewsReactjs - if condition inside the map
I have a requisition for the states api.get('address/states') .then(res => { const states = res.data.data; this.setState({ states }); }) And another that searches the address data by the zip code…
-
0
votes1
answer197
viewsWhat problem is occurring in Axios with this HTTP call?
I’m trying to make a call HTTP, but as a beginner I’m not able to find the error.. I already tested it on the emulator and the error which is displayed as follows: 0, _loginService.autenticacao) is…
-
0
votes1
answer5128
viewsSyntaxerror: Unexpected token < in JSON at position 0
I’m trying to file a requisition HTTP for a API and I get the following error: Uncaught (in Promise) Syntaxerror: Unexpected token < in JSON at position 0 Why is this happening error? How to…
-
0
votes1
answer481
viewsRedirect after post in api with Reactjs files
Good morning, I am trying to create a login screen in Reactjs where a post is done on an api, after sending the user email and password, the API returns the JWT authentication token. API post in my…
react login react-router react-dom reactive-programmingasked 5 years, 5 months ago Daniel Pelissari 55 -
0
votes1
answer42
viewsHow to add class ="active"
import React from 'react' import { Link, withRouter } from 'react-router-dom' const isActive= (history, path) => { if (history.location.pathname === path) return { active: 'active' } else return…
-
0
votes2
answers461
viewsHow to wait two promises before returning to function?
I am making a code that makes two requests, the value returned is the size of a file content-length, but I need the function that contains these two requests to return the value after the requests…
-
0
votes1
answer1023
viewsReact Hooks + Socket.io
I’m using the React Hooks for a simple application, a clone of the Instragam feed. To request each post in the api, I’m using this logic: function Feed() { const [posts, setPost] = useState([]);…
-
0
votes1
answer758
viewsLoad Reactjs page
Hello, I have the following code: import React from 'react' // Importanto Imagens import bgimage from '../images/bgimage_m.jpg' import person_1 from '../images/person_1.jpg' const Clientes = props…
-
0
votes1
answer3403
viewserror while running run-android with React-Native
Well, after managing to run the initial command and create the project(React-Native init ) and being with my android emulator running on the machine (Genymotion) but running run-android it accuses…
-
0
votes2
answers874
viewsHow to pass an object inside a props?
I’m trying to show the attributes of the music object inside a component but it only renders the list but not the attributes of the object I passed. What I’m doing wrong? Objeto Musica: function…
-
0
votes1
answer87
viewsHow to limit tag insertion with React Select
I’m using React Select to work with input tags. By inserting something into the input and pressing enter, the tag is inserted... The point is that I could not find anything related to limitations of…
-
0
votes0
answers338
viewscreate-React-app returning error 'Cannot find module 'React-scripts/scripts/init.js' '
When I try to create the React project with both npm and Yarn (create-React-app test), it returns the following error: internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module…
-
0
votes1
answer1765
viewsHow to change the state of the parent component by the child component?
I have a modal (child) component that I want to display information by clicking on the parent component object. Son: import React, {Component} from 'react'; import {Modal, Text, View, Button} from…
-
0
votes1
answer1190
viewsPlacing an image with in a React component
I am using an React component with the following code: import React from 'react' import './styles.css' import logo from './icons/logo.svg' import { FontAwesomeIcon } from…
-
0
votes1
answer144
viewsError trying to export a constant in React
I have created this: const funcionarioReducer = (state = [], action) => { switch(action.type) { case 'ADD_FUNCIONARIO': return state.concat([action.data]); default: return state; } } export…
-
0
votes1
answer56
viewsHow to add the response of an API call in Reactjs?
I am creating a doubt generated from another that I had done before. The link to the first question is: Adding an array within an array? I created this Arrow Function to be able to put the code in…
-
0
votes1
answer256
viewsLoading dependency Graph, done. error: bundling failed: Referenceerror: Unknown helper objectSpread2 at loadHelper
I am developing an app in React On. However when generating buildo I get message: Loading dependency Graph, done. error: bundling failed: Referenceerror: Unknown helper objectSpread2 at loadHelper…
-
0
votes1
answer76
viewsSpotify API: this.state.data.map is not a Function
I am trying to pass the data from the api to a child component, but always giving this error when I type the name of the singer in the input, because I want to fetch every letter typed, not just…
-
0
votes1
answer126
viewsReact-Activate Invariant Violation:_default(...)
I’m a beginner in React-On, and for the first project I decided to redo an old class job. However this error is occurring, I was just making a screen of Oggin and trying to register there in App.js…
-
0
votes0
answers281
viewsHelp with dynamic images in Reactjs
> My code is returning the string value in the console, but does not return the image even though the path is right in the scr. I do not know what my mistake.I ask for help I am new in language.…
-
0
votes2
answers40
viewsWhy does this component created with function not work?
Component creating with function, returns error import { React } from "react"; import { Text } from "react-native"; const Product = () => <Text>Product</Text>; export default Product;…
-
0
votes1
answer54
viewsDoubt about React-Router
My App.jsx has a Browserrouter with Nav, Footer and between them the Routes, but I want a /admin that does not render the Nav and Footer. But necessarily when I add /admin to the Routes it pulls Nav…
-
0
votes0
answers524
viewsCommand failed: gradlew.bat app:installDebug -Preactnativedevserverport=8081
Good morning, I’m trying to do the deploy of the application in the nutcase, but you’re making this mistake, I’ve tried change the door, but it didn’t work, someone can help me? Failed to install…
-
0
votes1
answer98
viewsChange will mask a Textfield according to the choice in a Selectfield
Good afternoon to you all. I am a beginner in Reactjs, I am working on the construction of a form and in the PHONE field I need the mask of this Textfield change according to the selection of the…
reactasked 5 years, 3 months ago Hebert Luiz Costa 1 -
0
votes0
answers29
views200vw usage affecting HTML height in Chrome Mobile
Hello! I’m building a small portfolio in React with a side scroll. For this, I created a container of 100vh height and 200vw length, to store two screens that will make the scroll. Everything works…
-
0
votes1
answer59
viewsReact: Appbar material-ui is not shown
Hello, I installed the material-ui in React to do tests, but Appbar does not show on screen. I created an Appbar component that uses the Appbar material-ui, then used it in the App class, and it…
-
0
votes1
answer101
viewsSave data to Firebase
My code is like this: import React from 'react'; import './addAssalariado.css' import * as firebase from "firebase/app"; export default function addAssalariado(){ function add(){ var name =…