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
11 views

How can I attach to a stateless component's ref in React?

I am looking to create a stateless component who's input can be validated by the parent element. In my example below, I am running into a problem where the input ref is never being assigned to the ...
0
votes
0answers
6 views

React - how to style nested react component inside parent component

I am trying to make a react component which shows a div like list item with some text and date picker and time picker. I have date picker and time picker component. But when I try to put them in ...
0
votes
1answer
15 views

Selected state is not retaining new selected option

OS: Windows 10 Pro Browser: Opera So, the issue I'm having, is that when a selection with onChange() is made, the selected option will immediately display (go back) to its previous selected option ...
1
vote
1answer
16 views

What is the point of the props argument in the setState async setting function

In React when you want to update state based on a previous value of the state, due to some asynchronous qualities about the setState method, you need to pass in a function as the first param so that ...
0
votes
1answer
12 views

How to pass JSON with @ symbol to props in React [duplicate]

I am requesting json data from a db using axios with react. I am able to get the json and assign it to state and pass it as props to child components in my app. The problem I am having is that some of ...
0
votes
1answer
9 views

React Mobile navigation doesn't collapse after click

I have a mobile navigation bar that appears at a certain breakpoint. If the button MENU is clicked, the menu appears and the button changes to CLOSE. Then clicking on CLOSE collapses the menu and the ...
0
votes
0answers
12 views

React- Toggling True/False object values

I'm currently trying to integrate my own column selector into the flask-bootstrap-table 3.0-beta2 package. I found an example on the github in the issues section which is as follows: export default ...
0
votes
1answer
19 views

React - Warning: React.createElement: type should not be null, undefined, boolean, or number

I am trying to implement this chart in my project See the Codepen In my React application i have created this component called ChartsGrid where i am importing LineChart from './d3/LineChart' with ...
1
vote
1answer
17 views

React updating props with state data

I have a Component that is handling a contact forum submission from a user. I want to take the state that the user submits and add it to my props data. Right now everything is working, but the ...
0
votes
1answer
9 views

redux sagas - block dispatched action

If action FOO is dispatched and my saga starts a task via takeEvery(FOO), Is it possible to mutate the action being dispatched so I have START_FOO instead of FOO reaching the reducer? I know that I ...
0
votes
1answer
15 views

How to pass extra props down to children of arry.map

I have been trying to pass extra props own to the children being created with the .map function but I have not been able to succeed in passing them succesfully. This is my code: export const ...
0
votes
0answers
12 views

Wrapping component breaks style

const Login = () => ( <FlatButton label="Login" /> ); export class App extends Component { render() { return ( <div className="container"> <MuiThemeProvider>...
0
votes
0answers
3 views

How to implement media Queries with Radium inside Material UI component

trying to implement breakpoint in material ui component, Raised button. working for normal div's but not for material ui component tried wrapping button inside radium import RaisedButton from '...
0
votes
0answers
10 views

How to display name and email inside material UI chip?

I am using Material UI chip to display name and email side by side. But when name is large email goes out of the chips boundary This is my function returning chips getGuestList() { let {guests}...
0
votes
0answers
11 views

Getting babel build errors with the next.js getting started example

Following along the getting started example from ZEIT for next.js, I'm getting this error: error in ./pages/index.js Module build failed: ReferenceError: [BABEL] /Users/Projects/nextDemo/pages/...
0
votes
0answers
15 views

Error when reorder list of components React

I have a component which loads a list of components <MyComponent>. The bug happens when modify the style this component and reorder again, the style always stays in component of the position in ...
0
votes
2answers
20 views

ReactJS PropType to check values of associative arrays

I'm passing in an object, which is an associative array, as a prop. I don't know the keys (property names) beforehand, I only know that the values should be strings (for example). How can I validate ...
0
votes
0answers
9 views

java applet not working in iframe IE all versions

I have portal which opens a react application in an iframe. One one page I am dynamically adding applet code like this : win.document.getElementById('rdsInfo').innerHTML = '<object type="...
0
votes
1answer
10 views

Getting Uncaught TypeError: Cannot read property 'prepareStyles' of undefined while trying to open a Dialog

I am trying to open a Dialog box by a button click. When I am clicking the button the Dialog first of all is not opened and I am getting Error : Uncaught TypeError: Cannot read property 'prepareStyles'...
0
votes
0answers
13 views

DraftJs React/Redux - I lose focus after typing one letter + errorMsg: editorState.getCurrentContent is not a function

In order to learn and understand draftjs, what will follow is coming directly from the 'Rich' example from the draftjs github. After linking the editorState with a redux flow, I'm facing a little ...
0
votes
1answer
24 views

Unresolved variable, if variable is in if-else block

I have an if-else-block in my render-function. I always get the error that my myattribute is an unresolved variable. render: function() { return ({ this.state.something.length ? ( ...
1
vote
2answers
26 views

react-router: Nested route component mounts before parent route component?

I have a nested route like this: <Route path="modules" component={Modules}> <Route path=":moduleId" component={Module}/> </Route> I noticed that Module is mounting before Modules ...
1
vote
2answers
22 views

react native onPress event not working in loop

My Class Code problem is onPress function give the following error if i use it in the loop onPress={() => this.onPressButton()} nothing happens if i use this line of code onPress={this....
0
votes
0answers
19 views

Merge in huge object to immutable.js

I have the following operation inside my reducer: case RECEIVE_DATE: return state.merge({ isFetching: false, data: action.response }); It merges the current state with a ...
0
votes
0answers
21 views

hand Onclick event that is in the parent component react

I have a component that will return, <div className="top-margin"> {this.orgs().map( (o)=>{ return <AOD obj={o} /> })} </div> <div className="modal fade" id="...
0
votes
0answers
8 views

React Native failed to find target with hash string 'android-23' React Native

I have been following this link to get started with react native https://facebook.github.io/react-native/docs/getting-started.html When i try to run this command react-native run-android in my ...
1
vote
0answers
11 views

Issues Testing React-Bootstrap Components

I am having some difficulties when testing components that use React-Bootstrap with Mocha, Chai, and Enzyme. Hopefully someone can key me into what I am doing wrong. When testing components that do ...
0
votes
0answers
11 views

Meteor with absolute paths and React Storybook

I am currently working on a legacy Meteor application (1.3.3) that heavily relies on globals and absolute paths. I am trying to setup React Storybook, but I have trouble importing my Components. Here ...
0
votes
1answer
17 views

Cassandra with react, net.socket error

I am a newwbie to react and cassandra. I am just trying to connect to the cassandra db by using "npm i cassandra-driver". I am having a main.js file where I used the cassandra driver code. Main.js ...
2
votes
2answers
26 views

ReactJS onClick state change one step behind

I'm building a very primitive quiz app with ReactJS and I'm having trouble updating the state of my Questions component. Its behavior is it renders the correct index of the questions array to the DOM ...
0
votes
0answers
31 views

How do I scroll past the top or bottom of a list in React?

I have a react component that is generating a list. For examples sake lets say that it looks like this: <table> <tbody> <tr> <td> {...} </...
1
vote
2answers
22 views

When in the React component life cycle can I execute a route change?

I have some kind of a wizard where each step has it's own route. Now when a user uses a direct link to the second step route, I would like to redirect him to the first step (using browserHistory....
0
votes
1answer
11 views

Webpack module cannot be imported in multiple entry config

In my webpack config file, i have multiple entry points:- entry: { bundle: "./src/index1.js", rUI: "./other/src/js/ui/index2.js" }, In index1.js file, all imports are getting resolved, but ...
2
votes
1answer
19 views

Redux Provider not passing down Props/State

I've created a React App using create-react-app and added Redux to it. After adding <Provider store={store} /> only the component that I pass as the argument (the main component) on connectis ...
0
votes
1answer
16 views

Timeout for component unmount

Okay, I have an idea about making comfortable and native page transitions with React. I made an example of how pages must transition between themselves - you can check it here. And then I started to ...
0
votes
1answer
17 views

Axios ReactJS - Cannot read property 'setState' of undefined

I am getting an error "TypeError: Cannot read property 'setState' of undefined" while doing a simple thing in ReactJS. I am trying to use axios to fill input with response data. So far without success....
0
votes
0answers
18 views

Why “right click to play adobe flash player” is appearing on my website?

I'm trying to figure out why every time I try to reload my page this message from adobe flash player is showing up on my web page and then in miliseconds it disappears, btw I don't have any flash ...
2
votes
0answers
21 views

create-react-app with sass not loading styles

I'm trying to add sass/scss support to create-react-app. So I did these steps: npm eject npm install sass-loader node-sass --save-dev Opned the webpack.config.dev.js file and added this to loaders ...
0
votes
1answer
14 views

ImmutableJS: Merging two Lists by values

I have two Immutable.JS lists: const numbers = fromJS([2]); const moreNumbers = fromJS([1, 2]); How can I merge these by value and preserving order to produce the following list? [2, 1] The idea ...
0
votes
1answer
23 views

this.setState React Native

Please don't judge me harshly, I began learning React native 4 days ago. I'm trying to pass a property this to a different Scene, however, I keep encountering this error _this.setState is not a ...
0
votes
0answers
15 views

Use React Native components in a Meteor React web application

As we're building a Meteor React web application which will be presented inside a web view inside a react native application. As you can probably tell by reading that sentence, this doesn't make much ...
1
vote
2answers
15 views

react $ dosn't seems to work

alert('Save ${this.state.course.title}'); the above dons't seems to work , am i doing some think wrong? i have listed the full code which should just display the text entered in the text box in the ...
1
vote
2answers
16 views

How to connect reactJS with mysql on node.js

I am trying to insert form data from reactJS to mysql database on Node.js. I am beginner in reactJS so please help me. import React from 'react'; import Layout from './App.jsx'; class Header extends ...
0
votes
0answers
14 views

User Authentication in react application uses the server side rendering without using flux

Is anyone suggest me how to implement the user authentication in simple react application which using the server side rendering. I have try to use the localstorage to save and retrieve the value. And ...
1
vote
1answer
18 views

Syntax Error when test component with SASS file imported

I'm trying test my React component with Jest + Enzyme, but when my component has SASS file (scss), is occurring SyntaxError. This is my SASS file content: .user-box { width: 50px; height: 50px; }...
0
votes
3answers
32 views

remove console.logs with Webpack & Uglify

I am trying to remove console.logs with Webpack's Uglify plugin but it seems that Uglify plugin that comes bundled with Webpack doesn't have that option, its not mentioned in documentation. I am ...
1
vote
1answer
50 views

Listing in React using array.map does not working in IE10

I have such code for rendering function: render () { return ( <div className='s-with-fancy-arrow'> <select className='city' onChange={this.change} value={this.state.selected}> ...
0
votes
1answer
17 views

Resolve.Alias in Webpack

I'm new to reactjs and I already did read article but I can't figure it how. I'm trying to create an alias when importing. This is working import BootstrapCss from '../../../dist/static/bootstrap/css/...
0
votes
5answers
28 views

react-native: Component doesn't render in .map

Something doesn't seem right here. it doesn't render the Animated.View without using return, while I've seen this work in many examples. Any guesses why this behaviour?
1
vote
0answers
10 views

I'm trying to send a request through Relay.injectNetworkLayer() to a java server

I have: ChildItem = Relay.createContainer(ChildItem , { fragments: { childItem: () => Relay.QL` fragment on Item { name color }` }}); ItemList = Relay.createContainer(ItemList, ...