Questions tagged as 'react-dom'

2
answers

How to comment code block in JSX (React)

I want to know if it's possible to comment a block of code inside the render () method in React, I've tried all the ways I know and none of them worked. render() { return ( <div className="Events"> <div className="Ev...
asked by 21.11.2016 / 13:43
1
answer

Bug when reorder list of React components

I have a component that loads a list of components <ComponenteReordenavel> that is rearranged according to the user's taste. The bug happens when I modify the style of this component and reorder again, the style always...
asked by 08.12.2016 / 18:54
1
answer

Destroy React component (Unmounting Component)

I would like to know how I can destroy a component with React when I click a button. I found a way out, but in my design it is very "gambiarrosa". I have a state called show and when I click close I modify the value of this.state.show...
asked by 16.11.2016 / 19:59
1
answer

How to create a React component of select that in the bind event "change" get the right value that was selected?

Good evening! I'm trying to make a select component that is used more than once inside another Parent component. To create the "option" tags, I make a map inside the array that I created as a state of the Pai / App class. So far, it wor...
asked by 24.06.2017 / 23:42
1
answer

How to update properties in React setState

I'm trying to add objects to the 2 property of the FecthApis component. I make the call to the two Api's, and receive the requisition with the expected objects. However, when I try to include these objects in both properties with "setState", I g...
asked by 17.05.2017 / 21:01
1
answer

Problem in api call in React JS

I created a webapi in ASP.NET Core, and I need to consume it using React, the web api works normally, if I use curl or Postman among others, it works normally. The problem starts when I'm going to use React, when I try to make any requests for m...
asked by 04.10.2018 / 14:46
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
0
answers

Problems with React

I'm logging in and saving the data in a Session Storage, however every time I'm using a button (such as changing my password) I change the user's password but I have to log in again. Session Storage data is not lost but I do not know why I have...
asked by 26.11.2018 / 11:57
1
answer

How to pass values to another component in the routes?

I have a login page, which does authentication by token and shortly after, with the user and password entered are returned the user data. Right after this I redirect the user to a component called Dashboard. But I wanted to pass his data to that...
asked by 08.10.2018 / 17:26