Questions tagged as 'react'

2
answers

How to render children in React?

I have the following components: Obj import React from 'react'; export default class Obj extends React.Component { constructor(props) { super(props); console.log(props); } render() { let objs = Object.e...
asked by 20.03.2017 / 14:14
1
answer

React Native presents error when I try to emulate Android

I have an app that should be tested on an Android emulator. After setting to the React Native and Android environment (Including the environment variable). I can not run my app on the Android emulator. Message spoof: I'm using windows 1...
asked by 11.04.2017 / 16:23
1
answer

React dynamic array in imgs

I have the following function create dynamic array. funcListMap(_ref) { let list = []; _ref.map((i) => { list.push( <ListItem key={i.id}> <h1>{i.id}</h1> <span>{i.descricao}</sp...
asked by 21.10.2017 / 02:32
1
answer

How to get a data from an array of arrays. react-native

Good morning, could anyone help me with react-native ??? The codes below and my doubts are below componentDidMount() { return fetch('http://portal.ema.net.br/api/getprocedimentospublicos', { method: 'POST', }) .then(response => response.jso...
asked by 21.12.2018 / 14:52
1
answer

Asp.Net Core WebApi returning object list

I'm trying to return a list of a "Plan" Template which has a list of "Expenses", returning only the list of plan works, but when I add to return the list of expenses of an error in javascript. "Failed to load resource: net :: ERR_SPDY_PROTOCOL...
asked by 04.11.2018 / 00:38
1
answer

How to get the state of a reducer within a component with React Native

Hello, I'm new to React Native and I'm having trouble getting the status of a reducer for a component I made. it is as follows: import React from 'react' import { connect } from 'react-redux' import { View, Text } from 'react-native' class Fo...
asked by 06.11.2018 / 20:56
1
answer

Get state of child component in react

How do I get a state from a child component? In my example I have Shell.js which is the parent component: class Shell extends Component { render() { return ( <div> <Nav propsdaNav={1} /> <Superm...
asked by 30.10.2018 / 05:53
1
answer

Add +1 min to the countdown timer - With timer already finalized or in progress

Each time I click a button, I want to add +1 min to the timer. <Button onPress={this.somarUmMinuto} title="Somar 1 minuto" color="#007FFF" accessibilityLabel="Somar 1 minuto" /> Code used to set the countdown: inicia...
asked by 17.10.2018 / 18:26
1
answer

Creating components from another base component

The idea is to create a component for each input type, for example, InputPassword to <input type="password"> , but for code reuse, most of these components have an equal base, all have <div> as container, have a...
asked by 10.12.2018 / 15:18
1
answer

How to use function parameter as an attribute of an object?

Hello! In order to reuse a function I'm doing the following: View 1 has this object: obj: [ {"fruta": "maça", "valor1":1}, {"fruta": "banana", "valor1":1}, {"fruta": "pera", "valor1":1} ] View 2 has this object: obj: [ {...
asked by 10.10.2018 / 18:09