How should be Redux State Anatomy?

I'm working in an complex React App that handles with async calls that brings Deeply Big JavaScript objects. I was wondering what is the better way to create a state to store this objects. The Redux docs says: In a more complex app, you're going ...
more »

2017-02-22 21:02 (2) Answers

Rendering rows dynamically from this.state

I'm a bit green when it comes to ReactJS but it's part of a project I'm working on and I'm trying to understand how to properly mutate a component state: I have a Table component, which is declared in ES6 as such: class EmailStatisticTable extends ...
more »

2017-02-22 21:02 (2) Answers

Reactjs and material-ui library import error

I've got a quick question. I have react and all included but I want to import component from a material-ui library and the path is all good but it cannot find the module. My code: import React from 'react'; import ReactDOM from 'react-dom'; ...
more »

2017-02-22 17:02 (1) Answers

react router - pass props via url arguments

I am developing a multilingual and multi-currency app that uses react-router, react-router-redux & react-router-bootstrap for routing. Currently users arrive at the app with a default language and currency however I'd like to be able to provide ...
more »

2017-02-22 15:02 (2) Answers

How to convert API data into local langugae data?

Hi I am working on a reactJS+Flux Project.I am trying to convert my website into multi-language. I already have my dictionary of all the possible value coming from my API. I want to replace actual value of API with my dictionary value. for example: ...
more »

2017-02-22 12:02 (1) Answers

Zoom in and out on image in React.js

I am using react-image-gallery to view images on a page. And now I need to implement a zoom-in and zoom-out feature on button click. I have given a thorough read to the documentation of react-image-gallery but I couldn't find anything helpful. There ...
more »

2017-02-21 13:02 (1) Answers

Incrementing state value by one using React

In React I am trying to make a button increment a value stored in state. However using the code below function my value is set undefined or NaN when using handleClick. class QuestionList extends React.Component { constructor(props) { super(pr...
more »

2017-02-21 11:02 (3) Answers

Render component based on a variable - reactjs

I would like to ask, if its possible to return a component based on a variable, my idea if this is possible: var location = this.props.location // Eg. Asia,Australia <location+"HeaderComponent" /> My problem with this is I need to manually i...
more »

2017-02-21 10:02 (4) Answers

Using Airbnb's "react-with-styles" in React Native

Does anyone have a clear example of how to use react-with-styles (with react-with-styles-interface-react-native) inside a React Native project? The only example provided in their Github page is for a React project. Thanks! UPDATE: The React example ...
more »

2017-02-20 23:02 (0) Answers

Single Page Web App that DOESN'T change url

OK, I know I'm going against conventional wisdom here, but here goes. I'm learning how to build a SPA using react and redux, and things are going well. I've incorporated react-router, because it seemed to be the accepted thing to do, but now I'm ha...
more »

2017-02-20 23:02 (2) Answers

React this is undefined when using setState

Hey guys trying react out and having an issue when using setState, I keep getting Cannot read property setState of undefined error and I'm not sure how to fix it. I've tried using bind in the constructor but that still doesn't fix the issue. Thanks ...
more »

2017-02-20 20:02 (1) Answers

Test a function that calls an API

I need to test the fetchData() function. I have been trying to follow this (and many other) tutorials and trying to get it to work with my function for the past 3 hours but no luck so far. I'd preferably want to do it another way anyway because I don...
more »

2017-02-20 19:02 (1) Answers

React server-side rendering vs webpack

I'm new in server-side React rendering, and I can make simple isomorphic React applications with webpack for client side and Express for server side (through React of course). But now I have some trouble - I decided to use images in my project: expo...
more »

2017-02-20 19:02 (1) Answers

React component, unexpected token error

I am trying to create a basic stopwatch app, I'd like to tidy up my render function by putting markup into different methods, like this: export default class stopwatch extends Component { render() { return <View style={styles.container}> &...
more »

2017-02-20 19:02 (1) Answers

Optional (selective) Flow checks

Is there a way to just execute Flow checks for code where a type declaration is available? There is a way to enable checks per file (// @flow in header), but once this set, all parts of the code need type declarations (otherwise an error is logged l...
more »

2017-02-20 14:02 (1) Answers