Questions tagged as 'react'

1
answer

React, why use props in the constructor?

Hello, I have a question about reactjs, why should I use props inside the constructor and the props? constructor(props){super(props)} Why do not you use props in the constructor? Why not use props? Why use super? Thanks for the help.   ...
asked by 29.12.2018 / 19:11
0
answers

How to implement ReactJS in an Electron application?

Hello, well, I'm starting an application in Electron, but let's say I did in two parts, one part of Electron, the configuration is ok, except that the other part I did in other files using ReactJS, which is relatively ready, missing settings. My...
asked by 07.06.2018 / 13:56
1
answer

How do I get something from an input text and pass by reference?

How do I get something typed in an input text, and when I press a "Send" button, I send that text somewhere in my code, like we use 'this.state.algumaCoise' ... code: render(){ return( <div className="container"> <div...
asked by 06.11.2017 / 20:44
0
answers

React- createRef () Api - this.child.current is null

In order to allow my parent component to reach values of my child component ( Display ), I started working with the createRef () API that came out in this 16.3 patch. Following the example "Adding a Ref to a Class Componen...
asked by 23.04.2018 / 14:53
1
answer

React Router: Use more files with routes

I have a question regarding the use of React Router, I could have several files eg main.js, stock.js and bank.js and each file have their Router? getting something like: main.js import React from 'react'; import { Switch, Route } from 'r...
asked by 12.06.2018 / 16:21
2
answers

doubts about navigation

I created an RN project and inside it I created a folder called screens . Inside the screens folder I've created the app.js and home.js in index.android.js I just gave a: import App from './screens/app'; In app.js I'm using the...
asked by 12.08.2017 / 20:41
1
answer

React.js Error trying to access nested data from a Json via state of the component

I'm starting with React.js and I'm having trouble accessing nested data in a JSON. I am using whatwg-fetch to make the request and it is working, but I can not access the nested data of JSON, eg: data.title it displays on the sc...
asked by 16.01.2017 / 16:56
1
answer

How to organize my project?

I'm starting to learn react native and I have a lot of questions about how to structure my project. I'm creating a game of the old one, which has the following configuration: Home As you can see, each component resides in its own j...
asked by 18.04.2016 / 21:35
1
answer

React Native - ListView

Does the ReactNative ListView accept an array of arrays? I need to get the API data as follows: [[{"userId":1,"userName":"Ricardo"},{"userId":1,"userName":"Ricardo"}],[{"userId":1,"userName":"Ricardo"},{"userId":1,"userName":"Ricardo"}]]. I...
asked by 25.07.2016 / 18:52
1
answer

Search for last firebase record and incrementing in new record

I need to fetch the last code in an array of objects in firebase. Then increment +1 the last code and then save the list with the objects. For now I've created a generic DAO: //Dao generico 'use strict'; findMaxCode: function(table, callback...
asked by 08.12.2015 / 18:49