React is a JavaScript library for building user interfaces. It uses a declarative paradigm and aims to be both efficient and flexible.

learn more… | top users | synonyms (1)

0
votes
0answers
2 views

Google Tag Manager Dynamic React Index

i know how to make tag manager works with my React App by paste code after body opening: React + Router + Google Tag Manager The code: <noscript><iframe src="//www.googletagmanager.com/...
0
votes
0answers
5 views

meteor-react -Missing class properties transform

i am trying to implement react-dnd in my meteor with react project. i am getting error like this: Errors prevented startup: While processing files with ecmascript (for target web....
0
votes
2answers
9 views

Change button text dinamically in material-ui

If I try to change label button I got an error because label is a read only property. How could I change button text dinamically? export default class Tagger extends Component { static propTypes = {...
0
votes
0answers
4 views

Is there a way to have `react-scripts` include extra files in the root of the build?

My Situation: I'm hosting an app created with create-react-app on Surge. In order to have Surge let react-router handle the routes, I have to add a 200.html to the root, and in order to handle 404s, ...
0
votes
0answers
15 views

Want to create a new instance of the component

What i want is that i want to create a new ad which should have the title and desc which user input but when i run the code below it create and [object Object], and why is it showing object instead of ...
0
votes
1answer
11 views

how to reduce redux boilerplate

I'm new to redux and I find that every little thing x turns into x_success and x_failure, usually when fetching data or trying to create a new entity, and that means more action creators, and more ...
0
votes
1answer
11 views

React Native Router (react-native-router-flux) - more control in action triggering

we are using the React Native Router to manage the navigation. The render function of our router looks like this: <Scene key="tabbar" tabs={true} hideNavBar={true} tabBarStyle={{position: '...
0
votes
0answers
5 views

Redux Form 6 - onFocus is not triggering first time

When a Field's onFocus is called I need to dispatch an action, I would like the focus to be given to the input that triggered the event. The action is being dispatched but the input does not gain ...
0
votes
1answer
16 views

simulate for onClick not working in enzyme

This is a cancel button <div className="cancelFileBtn" onClick={this.props.cancelFileSending}> I need to simulate its click,I tried the following test wrapper.find('.cancelFileBtn')....
1
vote
1answer
12 views

Why does navbar back button still show with ActionConst.REPLACE in react-native-router-flux?

I start with Login scene, and when I click a button with Actions.home, type={ActionConst.REPLACE}, it works fine and on the Home scene the navigation bar does not have a back button. But if I go from ...
0
votes
1answer
20 views

Single Sign-on using ReactJS and Express

I have to integrate Single Sign-on in existing project. I have basic knowledge of how SSO works. What I have already in my existing project is - UI created in ReactJS. APIs are in Express with ...
0
votes
0answers
11 views

React browser push showing page before redirect

Hi there just small question , I got react redirect with browserHistory.push('/login/'); Everything works fine but before i will be redirected to login page i can see for a 1.2 sec Page that is ...
0
votes
1answer
8 views

React Native/Redux and react-native-router-flux: Why doesn't Actions.key work inside an action creator?

Using React Native and react-native-router-flux with redux, I have an action creator and inside I tried using Actions.key, in this case Actions.home, but it does not work. What could I be doing wrong? ...
0
votes
2answers
14 views

Node keeps sending GET /sockjs-node/info requests after terminating with CTRL + C

I don't think it has much to do with the issue, but I'm running a react app in development environment, after terminating (i think) the node process with ctrl + c , I keep getting these requests. ...
0
votes
1answer
13 views

react-native style tag “can't find variable” error

I'm trying to style a text element in my component, and when attempting to apply style tag "textStyle", I'm getting the following error: Here is my code: import React from 'react'; import { Text ...
0
votes
2answers
17 views

Redux - Map dispatch to prop -> got undefined when call action

I'm trying to build infinitive scroll in react using React / react-redux. Here is my container component : import React from "react"; import {SingleArticleContainer} from "./...
1
vote
2answers
29 views

How prevent click during mousemove

I have circle menu with rotation. And after simple click i want to fire click event, but during rotation - mousemove i want ignore click. For now i have - <g id="bottomMenuRotate" onMouseDown={...
0
votes
1answer
9 views

how to test an attribute's attribute of an object type prop in enzyme?

This is what my jsx file contains, {' '+this.props.file.attached.name} How can I write test for this name ?
1
vote
0answers
7 views

Cannot mock a module with jest, and test function calls

I create a project using create-app-component, which configures a new app with build scripts (babel, webpack, jest). I wrote a React component that I'm trying to test. The component is requiring ...
1
vote
2answers
39 views

What is the form of Javascript used in this class declaration?

This is from the table example from React-toolbox (which could use a tag) class TableTest extends React.Component { state = { selected: [], source: users }; handleSelect = (selected) => { ...
0
votes
0answers
35 views

Is it possible to decorate a react class written as a pure render function?

Say that a React class is defined as a pure function, as described in this article and in this question. For example: const Text = ({children}) => <p>{children}</p> instead of ...
1
vote
0answers
16 views

react install package npm

When I try to install a npm module (sendmail), I have this in console: npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\ProgramFiles\nodejs\node_modules\npm\bin\npm-...
1
vote
1answer
19 views

Importing a css file in bootstrap react

Importing a css file in bootstrap react. For navigation, an additional header.css file will be used. In bootstrap without react I embed the file as follows: <Nav class="navbar-abc-header navbar-...
1
vote
1answer
23 views

react ES6 component, variables in construct vs state variables

What is the difference between to define variables in the construct, and use them in the template versus to define inside getInitialState() function? In ES6 I can forget use getInitialState() and ...
0
votes
1answer
7 views

How can I restrict google map from repeating in react-google-maps

I am plotting different markers on different locations on the map and then drawing polylines from markers to markers. since the map is repeating the markers are repeating as well and so the lines go ...
0
votes
1answer
13 views

redux-api-middleware How to do global settings for endpoint

In redux-api-middleware we can create a API call like below, export function loadUsers() { return { [CALL_API]: { headers: { 'Content-Type': 'application/json' }, endpoint: 'http://...
2
votes
2answers
38 views

Cannot read property 'bind' of undefined. React.js

I'm making list using onsenui and react. but I cannot call a bind from onchanged. I couldn't figure out.... Does anyone can solve this? this is my code. I'd like to call handlechanged method from ...
0
votes
2answers
28 views

I am new to React, This is related to lifecycle of React

Just want to know if I have one component and whenever state is changed what all lifeycle methods are called? Also another Quetion is when i have two components and when a Parent state is updated what ...
1
vote
3answers
17 views

How to set image width to be 100% and height to be auto in react native?

I am trying to display list of images in a scrollview. Width should be 100%, while height should be automatic, keeping aspect ratio. The searches I did pointed to various solutions which give ...
0
votes
0answers
3 views

Webpack can 't find module 'is-finite' multi main

I have a problem. after install ubuntu, don't work webpack, I installed webpack and webpack-dev-server globally, and I tried to install module 'is-finite', but this don't help me! enter image ...
0
votes
1answer
22 views

React Native + Redux: How to properly pass in props to action callers?

I have the following set up, with all the methods with .bind(this) in the constructor. So the user enters in username and password in the inputs and get updated in state, and the component gets re-...
1
vote
0answers
14 views

How to disable submit button in ReactBootstrap Form component

<Form horizontal > <FormGroup controlId="formControl1"> </FormGroup> </Form> This form creates two buttons (close and create) at the bottom. I want to disable the ...
0
votes
0answers
14 views

React-native automatically resizing text input doesn't resize on initial load

With RNPlay being down, I'll just have to dump the code here, anyway, I'm using the code from the Example on the react-native repository, it looks like this: import React, { Component } from 'react' ...
0
votes
1answer
5 views

React-Intl How to use FormattedMessage in input placeholder

I'm unsure how to get the values from <FormattedMessage {...messages.placeholderIntlText} /> into a placeholder format like input: <input placeholder={<FormattedMessage {...messages....
1
vote
1answer
19 views

On Click of a Button made in one component is not changing value in other component in React.js

I am trying to make Button to Increment a value in React.js to learn communication between two components. One Component is just a Button showing +1 and other component is a Value that will be ...
0
votes
1answer
18 views

React, pure function warning?

I am trying to learn react and functional programming by trying to implement a simple todo app. I am not using flux as I am just trying to see the concepts of passing information between parent and ...
3
votes
1answer
31 views

Arrow function without curly braces

I'm new to both ES6 and React and I keep seeing arrow functions. Why is it that some arrow functions use curly braces after the fat arrow and some use parentheses? For example: const foo = (params) =&...
0
votes
1answer
15 views

How can I use this dropdown logic in more than one <li> element?

I created a simple dropdown button using react, it's working fine but now I want to use the same logic to use it on Two more buttons. How can I take the same logic that I'm using in 1st Dropdown menu ...
-3
votes
0answers
35 views

What do i need to know from JavaScript, AngularJS and ReactJS to be hired in my first programming job? [on hold]

Since i checked the following thread: What five JavaScript concepts do I need to understand to be a good AngularJS developer? i have a vague idea on the subject, but i would like a different answer ...
0
votes
2answers
21 views

How to retrieve the entire state of a component as a single object?

I currently have my getInitialState set up such that the keys and values match up exactly for an AJAX POST call. The state gets completed as the form gets filled, and when the user clicks submit, I'd ...
0
votes
3answers
14 views

Check for empty string in JSX

Is there a way in React/JSX to check if a user's input string is empty? Component.js {((this.props.description.name ==" ")||(this.props.description.name.length==""))? This condition works when a ...
0
votes
1answer
10 views

Should I still respond to html if view is rendered with javascript?

I have a Rails application integrated with react, my views are rendered with react, including the html (JSX). I noticed that I had a few format.html responses from back when my views were regular erb ...
0
votes
1answer
17 views

Filtering JSON in React

I'm loading some JSON data using FETCH. I'm trying to add/create a simple filtering functionality on the content displayed. I'm getting this error: Uncaught TypeError: Cannot read property '...
0
votes
1answer
5 views

workflow for npm forking and editing

I'd like to use https://github.com/intljusticemission/react-big-calendar. But it doesn't say how I should include the component in my existing project. For python library, I would clone it and pip ...
0
votes
0answers
14 views

Wit.ai API Call Fails in Client

I am trying to make an API request to Wit.ai via javascript (ReactJS). My browser network tab shows the call fails with the message: "error" : "Bad auth, check token/params" However, that same ...
0
votes
1answer
9 views

What is proc and method in react javascript?

I'm learning about HOC from this article but have not see proc and method before. What does those refer to? function refsHOC(WrappedComponent) { return class RefsHOC extends React.Component { ...
0
votes
1answer
12 views

Custom style object in Material UI

Most Material UI components have a style attribute like this: Can anyone give me an example how to use it? Do I have to inspect the generated DOM to see what html elements are actually generated ...
0
votes
1answer
11 views

Modify parent component state from child

I am very new to React (so this may be very trivial) and while trying it out on a simple app I am stuck when trying to change a state in a parent component from within a child. For the app to work, ...
0
votes
1answer
16 views

Ajax request using Fetch in React

I'm doing an Ajax request in React using Fetch. The request is working fine but I'm getting an error even though I specified a unique key. Here is the warning message: Warning: Each child in an array ...
2
votes
2answers
29 views

React JS Uncaught Reference Error: function not defined

I am trying to call shuffleCards when the upon a click event in a ReactJs component. However, I am receiving the following error: Uncaught ReferenceError: shuffleCards is not defined Here's my ...