Passing data between two unrelated React apps

I have an HTML page that is including two separate webpack-generated React bundles, each with its own index.js entry file that just does a RenderDOM.render() of its respective component to its respective <div>. <!doctype html> <html l...
more »

2017-10-16 16:10 (1) Answers

iterate over JSON array in react-native

I've come across a problem working in react native. I've parsed a JSON object and need to iterate over an array nested inside it.I want to get all profiles objects in a list. i tried with the below code but its not fetching profiles object .how to p...
more »

2017-10-12 07:10 (1) Answers

Why won't my React accordion animation work?

I've implemented my own responsive accordion in React, and I can't get it to animate the opening of a fold. This is especially odd because I can get the icon before the title to animate up and down, and, other than the icon being a pseudo-element, I...
more »

2017-10-09 17:10 (1) Answers

Return react 16 array elements in typescript

I want to use the new react 16 feature to return array elements in my render but i'm getting the typescript error Property 'type' is missing in type 'Element[]' const Elements: StatelessComponent<{}> = () => ([ <div key="a"></div...
more »

2017-10-09 11:10 (1) Answers

Server Side Rendering PHP with ReactJS frontend

For Google's SEO, I need help on server side rendering index html using PHP with ReactJS frontend. In frontend, I did set up as a ReactJS project using NPM packages. As I am new to backend PHP, I only know the very basics. I am trying to change the m...
more »

2017-10-01 14:10 (0) Answers

Handling external function imports

This might be a rather general question on how to handle imports of external functions and exporting functions. So I have a component like this: import React, {Component} from "react"; import {handleChange} from "./path"; //imports from different...
more »

2017-09-25 15:09 (2) Answers

React router behaviour with google cached pages.

We have recently ported our application from monolithic RubyOnRails to React/Redux Framework. We are facing a problem with react-router and google cached pages in the results of google. In this case we have a SPA(single page application), which uses ...
more »

2017-09-18 07:09 (0) Answers

React with Express Private Routes

I've mainly been using server-side rendering solutions to pass data from the server to the client and render that in the browser. Some major benefits to this include being able to get data and pass it to the client without exposing a route that is p...
more »

2017-09-16 19:09 (1) Answers

jQuery click event is not working on table

I'm having a table in my react application. I'm trying to implement click event like this: $('#detailedTable tbody').on('click', 'tr', function() { //var row = $(this).parent() if ($(this).next('tr').hasClass('row-details')) { $(this...
more »

2017-09-16 13:09 (2) Answers

Grouping objects inside nested javascript arrays

I have the following array, which has an object holding nested arrays that in turn have objects of their own: var list = [{ one: [{key: 1, value: 'eng1'}, {key: 2, value: 'eng2'}], two: [{key: 1, value: 'esp1'}, {key: 2, value: 'esp2'}] }]; ...
more »

2017-09-16 02:09 (2) Answers

ASP.NET Core 2.0 Razor vs Angular/React/etc

My team and I have received funding to start developing an Enterprise level web application (won't go into details of what it does). The application will have many separate web pages but two of those pages being more focused and very heavy - heavy a...
more »

2017-09-15 05:09 (0) Answers

How to consume third party .flow files?

I'm working on adding flow to a React.js app. I've used flow-typed to add several packages, which seems to be working. This issue is that I'm using the Material-UI beta. They don't have a repo in flow-typed, but they do provide Component.js.flow fil...
more »

2017-09-06 22:09 (1) Answers

React replace item in array

I am trying to replace a single item in my array with another item, I have a placeholder with a number position on it, and when I click on add the first item should go into the 1st position , 2nd item into the 2nd position and so on. At the moment i...
more »

2017-09-06 12:09 (1) Answers