Questions tagged as 'reactjs'

2
answers

Update array in React

Having the following code, this.state = { valores: ['A', 'B', 'C'] } How could I update an element in this array? Of the type: this.setState({ valores[1]: 'a' })     
asked by 24.11.2016 / 19:27
1
answer

Doubt with functions in javascript, react js

because when I put a function in this way, the this.state , is not bringing me the values that happened when I write in the input fnLogin(event){ debugger; event.preventDefault(); this.setState(obtenerToken(this.s...
asked by 16.11.2018 / 20:12
1
answer

Can you import props from another component?

If we import an object or a json, we can import it and send it by the props of a Component. Example: import Componente from './componente.js' import items from './menu.js' then in the App class render() { return(...
asked by 27.10.2017 / 09:15
1
answer

this.state.users.map is not a function

Trying to show data in a view in React Js , I have found an error that following the steps of the tutorial still persists:    this.state.users.map is not a function The code is as follows import React, {Component} from 'react'; im...
asked by 23.02.2018 / 19:11
2
answers

How to detect when the user scrolls to the bottom of the site?

What forms could I detect in my component when the user scrolls and reaches the end of the site and thus call a function when this happens?     
asked by 23.02.2017 / 19:19
2
answers

Problem with $ .getJSON.then ()

I do a data extraction with $ .getJSON () without problems, I get what I want from my database and then I work with .then but in this line getKeys().then(data => data.map(key => keys.push(key))); that I keep in my variable 'keys' whic...
asked by 15.03.2017 / 20:24
2
answers

Include HTML content without adding it in REACT classes

I have a somewhat simple doubt, maybe others have had it before. I'm starting with react and, as we know, the main thing is to change content segments through the components. Now, I have a specific doubt. If when updating a segment, I would like...
asked by 15.01.2017 / 14:35
1
answer

Error compiling jsx with Browserify ReactJS

Good morning, I am totally new in the world of ReactJS. I am trying to make a trial app and I find the following. These are my files: BtnLink.jsx: var BtnLink = new React.createClass({ render : function(){ return(...
asked by 04.01.2017 / 06:24
1
answer

Retrieve backend data in ComponentDidMount or in ComponentWillMount

I have the following component: import React, { Component } from 'react' import data from '../data/dummyDataEx.json' export default class Resumen extends Component { constructor (...args) { super(...args) this.state = { resul...
asked by 23.10.2016 / 12:22
1
answer

Help with three.js in express.js

I want to upload a .json format with objLoader of three.js, everything works perfect in webpack dev-server but when I try to open it through Expressjs The error appears: this is my threejs code group = new THREE.Group(); const objLoader...
asked by 03.10.2018 / 00:54