ReactJS with Fetch on older browsers

I am implementing React JS, with Webpack and Babel. However, I am having trouble getting Fetch to work with IE 11. I have the following in my .babelrc file: { "presets" : ["env", "stage-0", "react"] } and the following in my webpack.config.js ...
more »

2017-04-18 20:04 (2) Answers

Online Example (CSS of a Cube) inside React

I am trying to reproduce this cube inside of a webpage I am making using react (i am very new to react, so this question might be stupid) So, I created a component, which contains the HTML structure for the cu...
more »

2017-04-18 17:04 (1) Answers

Why my filtering and sorting is not working?

I have an array of object event where each event has a start date and an end date. I am trying to filter the events by removing any events that are older than now. Then, I am trying to sort my events as most recent to then display them on the screen...
more »

2017-04-18 16:04 (2) Answers

Create new Date/Time using separate Date and Time

I have a form set-up in such a way that I collect the dates from a different input box and time from a dif var appointment_date = new Date(); var appointment_start = new Date("Mon Apr 24 2017 20:00:00 GMT-0400 (EDT)"); var appointment_end = ne...
more »

2017-04-18 15:04 (2) Answers

Declare a functional component as "pure"

How to signal to React that a functional component is "pure", as an equivalent of React.PureComponent for component classes? function C(props) { return <var>{props.n}</var> } without making it a class class C extends React.PureCom...
more »

2017-04-18 13:04 (1) Answers

Correct way to load config into Redux application

I need to read config.json file before my application will start. This config contains urls to my back-end services. Which will be used into redux action-creators. I have 2 approaches: fetch json and save data into state. And than get urls from st...
more »

2017-04-18 12:04 (3) Answers

Real time update with ReactJS, Redux and Websocket

This question is regarding the websocket integration with ReactJS and Redux. I’m trying to build an application where it has the ability to do real time updates. User A should see the changes which User B makes without refreshing the page. Can yo...
more »

2017-04-18 08:04 (1) Answers

How to overcome the CORS issue in ReactJS

I am trying to make an API call through Axios in my React Application.However, Iam getting this CORS issue on my browser. I am wondering if i can resolve this issue from a client side as i donot have any access to the API internally.Attached is my co...
more »

2017-04-18 04:04 (3) Answers

React Redux - state undefined on first render

For my client I'm creating something like quiz web app in react with redux based on websockets ( with a huge, very unique data. No user interaction, just presentation layer. It works like this: I get websocket event with url to my layout a...
more »

2017-04-17 23:04 (1) Answers

Jest, Unexpected Token Import

I start a new react project and I wand to use Jest as testing platform. Despite docs, blogs and many others resources like stackoverflow, I have always an "unexpected token import" error related probably to a babel problem, but my conf seem to be ok....
more »

2017-04-17 22:04 (0) Answers

how get context react using django

i need get context in react using django but i cant do it this is my code in my jsx <h1>{{titulo}}</h1> <h2>{{ejemplo}}</h2> in my template: {% load staticfiles %} <!DOCTYPE html> <html> <head> <...
more »

2017-04-17 20:04 (1) Answers

Migrating react-router v3 to v4

I'm currently trying to migrate react-router from v3 to v4, but I can't quite grasp the new concepts, my old react-router v3 code looks like this, can someone please take a look and give me some hints? Thanks! <Router history={ browserHistory }&...
more »

2017-04-17 19:04 (1) Answers

React Native SectionList scroll to section

I just changed my ListView to React Native's new SectionList and now the app crashes when I attempt to use the scrollTo function, stating that it's undefined. I tried looking up new/alternative functions that may help, but none of them seem to be wor...
more »

2017-04-17 15:04 (0) Answers

ReactJS - two loops?

Is there availaiblity to use 2 (or more) loops in one component? When I use one map: <div className="board"> {Array(height).fill(1).map((elh, h) => <Field key={h}/> )} </div> It shows propertly field 10 times, ...
more »

2017-04-17 10:04 (3) Answers

How to profile react app?

I have a react app and I want to measure its performance. For example, how much time is spent on the internet, and on each function with self-time and total time. I tried to use the default chrome profiler but it only gives me the result after bundle...
more »

2017-04-17 04:04 (0) Answers

What does the redux docs mean for mapStateToProps?

What does the : stateProps part of this mean? I know that the whole mapStateToProps function is optional and that it takes the first argument of state and an optional second argument of ownProps, but what does a : designate? Is this what the function...
more »

2017-04-17 01:04 (1) Answers