Questions tagged as 'reactjs'

2
answers

Using Object.assign for a multi-level javascript object

Well I am doing a React-Readux application, and I have the following Array of objects that my store has: const authors = [ { id: 'cory-house', firstName: 'Cory', lastName: 'House', address: { city: 'Caracas' } },...
asked by 02.08.2017 / 01:16
1
answer

Problem with install react-dom

Well I was watching tutorials about reactjs then installing dependencies I used this command npm install react react-dom but at the moment that I should install them I get this error     
asked by 16.06.2017 / 16:18
1
answer

React, Google map: "Unexpected token" and "google is not defined" when deployed

I'm getting two errors, the first: ###Uncaught SyntaxError: Unexpected token < And the second: ###ReferenceError: google is not defined When I run it on my computer everything works but at the time of deployment in now.io e...
asked by 11.06.2018 / 08:09
2
answers

Remove Jquery EventListener react.js

I am working on a project using react.js, I have a component called chatBox which I am using in different components, as shown in the example. The problem that arises is that every time I render a component the click event is duplicating. Is...
asked by 26.10.2016 / 23:35
0
answers

Error match is not defined no-undef in react.js

Through <Route> , I direct to different components. In one of them I need to pass a parameter, and I do it this way: const AppRoutes = () => <Switch> <Route path='/:slug' component={Articulo} />...
asked by 11.07.2018 / 01:44
2
answers

How to use "ajax" with the "scaffold" of Ruby on Rails

Hi, I'm using (REACT and Ruby on Rails) together and ajax and scaffold together to make a POST , PUT , DESTROY , GET but at the time of doing the POST simply does not do anything, this is my code:...
asked by 14.05.2017 / 22:24
1
answer

How to set up Visual Studio 2015 Community Update 3 to work with ES6 (jsx files)

Good day, I'm starting in the library react JS, I would like to know how is the correct way to configure visual studio 2015 community to work with react using ES6 and also be able to create jsx files, right now creating a file with that extensio...
asked by 20.10.2016 / 18:21
1
answer

WebPack: Module parse failed, babel-loader

I am new to this, I am learning react, but I have the following error I do not know if it is syntax in my webpackconfig or any property, dependency, I am missing. helpme .. webpack.config.js var HtmlWebpackPlugin = require('html-webpa...
asked by 02.03.2016 / 15:22
4
answers

how to copy the value of the state of a component into a variable

I have an initial state with objeto item to save the character data. equal const model = this.state.item to be able to obtain the object and make modifications but it seems to create a reference and not a copy. when I modify var...
asked by 31.05.2018 / 23:23
3
answers

Redux: When to spend props and when to take props from the state?

As you will know in redux we have access to the global state in any component with connect . But my question is: What is the best practice to pass props (or up to depth level) to nested components and when to take properties directl...
asked by 30.12.2016 / 11:52