Questions tagged as 'react'

0
answers

Eslint error property 'artist' does not exist react in visual studio code

I have the error already mentioned    message: 'Property' artist 'does not exist on type' Readonly < {   children ?: ReactNode; } > & Readonly < {} & ';' at: '16, 56 'source:' js' But the project starts normal without problem...
asked by 17.09.2017 / 20:58
1
answer

Material ui DatePicker sum one day

When selecting a date in the range of 1924, I always add a day. material-ui: 0.18.2 react: 15.4.1 import _ from 'lodash'; import React from 'react'; import DatePicker from 'material-ui/DatePicker'; import moment from 'moment'; const...
asked by 01.08.2017 / 20:57
2
answers

What is the difference between props and state in React?

I am not clear about the difference between these, I only know that the state is the one that can change and props are the properties of the state? Could you help me with an example or something like that, thanks!     
asked by 13.10.2017 / 22:23
2
answers

Access items within the then of a promise

I have this promise that is responsible for assigning an image to the items that I bring from another endpoint, it worked fine until I wanted to pass a title parameter to the getImage function, I had to put the for out of it to iterate and pass...
asked by 31.01.2018 / 16:54
1
answer

What is the function of refs in React?

I am learning React would like to know the definition or what is its use of refs, I have this function within a submit, what value does it get from refs? onSubmit(e) { e.preventDefault(); let email = this.refs.email.value.trim();...
asked by 17.08.2017 / 15:48
1
answer

Undefined in React method

When I press the "." to add the decimal, the display goes from "0" to "undefined.". That is, add it but the 0 becomes undefined. I do not understand why. state = { displayValue:"0", operator: null, pendingOperation: false, ne...
asked by 31.12.2018 / 23:29
2
answers

how to use the componentDidMount in react JS

What I am trying to do is that this part const topics = [ { name: 'React Router', id: 'react-router', description: 'Declarative, component based routing for React', resources: [ { name: 'URL Paramet...
asked by 31.08.2018 / 17:02
1
answer

How to create the production file in react with webpack

I have a simple crud that I did in react, the issue is that I did not use the create-react-app tool, but that I did it from scratch with webpack and babel, etc. My problem is how to create the production folder since with webpack it only does...
asked by 13.09.2018 / 22:13
2
answers

Error compiling APK Relase in React Native

I have my project, when running it with react-native run-android everything is fine. But when I generate the APK for production, it sends me an error.    $ ~ ProjectAwesome / android       $ ./gradlew assembleRelease      ...
asked by 20.06.2018 / 17:49
1
answer

event on click on react

my question is how to make an event a click pull out an item from a json in particular, that every time a click on a name appears the same name If I click on value: 1 send me the same name in a log and I could not get it   My code...
asked by 29.07.2018 / 20:17