Questions tagged as 'react'

2
answers

React Native - Pass data to another component

I'm having a question, I'm starting with react native and I'm building an app that contains some components and uses react-navigation. The question is: From this component that renders several items, when I click I want to receive this data i...
asked by 05.02.2018 / 22:28
1
answer

Redirect after submitting form with react-router-dom?

Good afternoon guys, are you okay? The situation is as follows, I'm using the react-router-dom in an application in ReactJS and need to after saving on a form, it goes to the list screen, showing the new record. At first with the react-router...
asked by 16.01.2018 / 23:20
2
answers

Unexpected token - React

I'm trying to run a project, but 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 ( function toggleDrawer = (open) => () => { ^ stat...
asked by 07.01.2018 / 23:34
1
answer

Round value JSON

In my code, I get a JSON with a value (Example: 6647), and I would like to round it to only 1 decimal place. In the code, I get the JSOn content by the call: render(){ return( <div className="container"> <div...
asked by 24.11.2017 / 11:27
1
answer

React Redux initState

It is common when you work with redux to define an initial state, eg const initState = { pagInicial:1, pagAtual:1, maxLinks:2, maxReg:5 } So far so good. Now and when I need an initial state, starting with some parameters...
asked by 30.11.2017 / 03:45
1
answer

Warning: validateDOMNesting (...): a can not appear as a descendant of a

Hello, I'm trying to use the Link component of react-router-dom to generate links in a data table, however, I'm facing the following problem: Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a&g...
asked by 26.07.2017 / 18:44
1
answer

Adding component dynamically in React

I'm trying to dynamically add one component within another in React. So that I click on some element and that onClick it will add this component next to the specified div. I tried to do this: (The object is added but not rendered) import Re...
asked by 10.05.2017 / 23:26
1
answer

onClick on dynamically created components React

I have a user-defined component called <Match> that is dynamically created inside another <Event> component. But putting an onClick on the component throws an exception. How to solve the problem, being that for e...
asked by 30.11.2016 / 14:54
1
answer

ReactJS + Angular + Babel

Good morning I need to use ReactJS in a project that I already use AngularJS. I managed to do the integration, but without using Babel, that is, I only managed to make Angular and ReactJS communicate through pure React. Could anyone tell me how...
asked by 08.06.2016 / 13:33
1
answer

How to change a state in the following scenario with the OnChange event

I have a component and the following state: this.state = { form : { name : '', username: '', email: '', phone: '', address: { street: '', suite: '', city: '',...
asked by 05.01.2019 / 02:42