Questions tagged as 'reactjs'

1
answer

How to add a new item within an array property in an object?

Hi, I'm trying to use the for in function to find the name of an array-like property that I have inside an object and if there is an item stored inside the property. But the problem is that it is saving the item in all the arrays and what I want...
asked by 15.03.2018 / 23:04
2
answers

Use React without Node.js

I'm starting on this React. From what I'm seeing there's no other way to use React other than writing it in JSX and then compiling it with Babel to make it work. But to be able to use Babel from console I have to use Node.js. But the only one I...
asked by 15.11.2016 / 04:12
2
answers

How to pass components as parameters in react?

I need to pass a component as a parameter to be rendered from another component. In the following example I want to render Title1 or Title2 within Profile given the components: export class Titulo1 extends React.Component { render () {...
asked by 07.03.2017 / 19:12
4
answers

How to consume an API with REACTJS?

I have an application created with reactjs which I must consume an api that returns me x data. The problem I have is that I do not know how to do it through reactjs, I've reviewed the Internet how to do it and I've replicated exactly the...
asked by 05.12.2018 / 14:13
1
answer

Components are not displayed in ReactJS

Hi, I was testing the export by default in reactjs , but when using the server that brings npm , it does not visualize me the components, or anything like that. This is the code I use in index.js . var React = require('react'); var...
asked by 19.05.2017 / 15:20
1
answer

I can not write in an input inside a table in ReactJS

Trying to place several input within a table, I have encountered an inconvenience, which is that it does not allow me to write anything in these, no matter how much I do things. As I read in my search, it can not be placed in such a wa...
asked by 18.04.2018 / 15:57
1
answer

Place cursor at the beginning of an input after event focus

I have a concern that I would like to share with you in order to find a solution. I am using React for the implementation of a project and I need in one of my forms that when performing the autofocus of one of its inputs which already has an...
asked by 11.04.2017 / 15:47
4
answers

How to compare elements of two JavaScript arrays?

I have a checkbox that allows me to filter items according to which are selected, but the system that I am was designed for a select of only 1 value, now I am adapting it to work with arrays instead of a number. Code let items = this.backup...
asked by 29.03.2017 / 22:34
1
answer

React name change when clicking. state

How to do to click on a button for example, I change the name I have in the state. attached code (there are more things like for example the counter that works for me) import React, { Component } from 'react'; import estilos from '../css/estil...
asked by 18.12.2018 / 22:18
1
answer

VS marks as error the syntax for a fragment

return <> <NavItem> <NavLink href={'/app/logout?returnUrl=${returnUrl}'}>Log out</NavLink> </NavItem> </> I have the previous code fragment inside a tsx file, in a folder in visua...
asked by 20.04.2018 / 19:45