Questions tagged as 'react'

1
answer

How to pass this.state from one screen to another screen with React Native

I'm new to React Native , what I want to do is to get a this.state of screen1 for example and use it on screen2 to print this same this.state . I made a very grotesque example to try to explain: import React, { Component } f...
asked by 30.10.2018 / 12:22
3
answers

React-chartjs-2 charts do not load on screen

import React, { Component } from 'react'; import {Bar} from 'react-chartjs-2'; import $ from 'jquery'; //NÚMERO DE VIAGENS POR MUNICIPIO class GeraGrafico extends Component{ constructor(props){ super(props); thi...
asked by 21.10.2018 / 15:37
1
answer

How to change state of complex objects in React?

I have the following object: obj = { title: "obj1", tab: [{ title: "titulo da tab 1", card: [{ title: "card1", url: "url", image: "image" }, { title: "card2", url: "url",...
asked by 13.08.2018 / 21:32
1
answer

Receive data via Ajax in PHP [duplicate]

I'm creating an application with React, and the backend part with PHP I have ajax request: pesquisaCliente(e) { e.preventDefault(); $.ajax({ url:'http://192.168.0.109/prontaentrega/pesquisaCliente.php', contentType:'application/j...
asked by 13.08.2018 / 23:59
1
answer

Change attribute of an array of objects in the state in the application

To try to make an attribute of one of the objects in an array of objects switch between true and false follow code: Initial status: constructor(props) { super(props) this.state = { post: [{ nome: '',...
asked by 17.07.2018 / 15:55
1
answer

Can I use my camera in a React Web App?

Personal I need to develop a web app with React, "it's not React Native", and it will be necessary to use the camera of the cell phone just to take a picture, is it possible with React? Are there any libs for this? I did a Google search I fou...
asked by 08.06.2018 / 21:53
1
answer

Dynamic background with CSS? How to make?

I have a question, is it possible to change background according to a condition? Example: function A() { if (meuArray.length === 7) { eu quero background verde } else { background azul } } At first I'm doing...
asked by 07.06.2018 / 04:59
1
answer

Picker does not select manually

I have this PickerUF component, which displays the list of states. import React, { Component } from "react"; import { StyleSheet, Platform } from "react-native"; import { Picker } from 'native-base' export default class PickerUF extends Comp...
asked by 17.04.2018 / 12:21
1
answer

React build vs (?) Webpack?

I'm taking a React course. I have an understanding of what React is, and what problem it solves. However when I put CMD "create-react-app x" it shows some other commands that I can use in this project including "npm run build" which theoretic...
asked by 23.05.2018 / 16:14