Using React linking images inside of components

I am learning react. I have a file website_index.js inside my components folder inside my src folder. Also inside my src folder is an images folder. I am trying to link pictures in a carousel to the pictures in the image folder but no matter what pat...
more »

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

Hiding fetch request keys

I am using the new OMDB api, and want to keep the fetch requests (that include the key) out of visibility on client-side. Here is an example of the problem whenever a user opens up dev tools:. I do all my calls in React like so: import OmdbKey f...
more »

2017-05-20 21:05 (0) Answers

Navbar for React Website

I am learning react. I am trying to create a navbar and have my tabs open components as new pages using browser router. (When I click the navitems nothing is happening) I have website_header.js as: import React, { Component } from 'react'; import {N...
more »

2017-05-20 21:05 (2) Answers

IndexRoute in react-router

Since IndexRoute is no longer supported by react-router, how can I render child components? I have the following component: class App extends Component { render() { return ( <div className="App"> <div className="centere...
more »

2017-05-20 18:05 (1) Answers object not displaying to the view?

I have an array stored in my redux store, but when I call, i) => {} nothing actually renders to the view... however if I console.log x to the console then they print.... How do I get my array contents to render to the view? ...
more »

2017-05-20 09:05 (2) Answers

REACT DROPZONE: Get data:images after upload

As topic, I want get data:images after upload. I get that if only upload one image. If multiple images how to array it in console? constructor(props) { super(props); this.state = { image: null }; } onDropMain(mainImage) { var that = ...
more »

2017-05-20 08:05 (1) Answers

Setting state through fetch in React Native

In my React Native app I am trying to fetch a particular response string from my API and display it within a text component in my view. The below does not work and returns "TypeError: undefined is not a function(evaluating _this5.setState...) I thin...
more »

2017-05-20 00:05 (1) Answers

ReactJs how to show list with load more option

I am tring to show todo list with load more option. I am appling limit.Limit is apply to list.But when i add loadmore()function. then i get error this.state.limit is null Wher i am wrong.Any one can suggest me. here is my code todoList.jsx var TodoL...
more »

2017-05-19 15:05 (1) Answers

How to clean up import statements in modules

I'm slowly learning how to break things up into components but my OCD is going mad on one particular one. I have a tab view containing lots of different cards / panels. Standard dashboard. However my import statements are growing quickly as I add new...
more »

2017-05-19 11:05 (4) Answers

How can I read Less variables in Javascript?

How can I read less variables in javascript like less-vars-to-js? I'm working on a React project(webpack2、less etc), but not SSR(node environment),so I can't use fs or node-glob module. Some people suggest me writting a webpack loader myself :(...
more »

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

React import root path helper

In react because I have to import varies helper or component I have this problem import approxPerDay from '../../../utils/approxPerDay.js' import otherstuff from '../components/otherstuff' and in another file it might be import approxPerDay from '...
more »

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

Changing setState in loop

How does one show a counter going from 1 to 2 to 3 to n on the click of a button. I've tried doing a setState in a for loop but thats not worked. I know react's setState is async, i've even tried to use prevState, but its not worked. import React, {...
more »

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

React router not showing browser history

I'm learning from this tutorial but I keep getting this error: 'react-router' does not contain an export named 'browserHistory'. The file that has react-router is this: import React from 'react'; import ReactDOM from 'react-dom'; import { Rout...
more »

2017-05-19 08:05 (1) Answers

Toggle arrow using react

I am trying to toggle an arrow using React. found some examples online, but still not able to make it work. this is what I have so far: class Footer extends React.Component { constructor(props) { super(props); this.state = { ...
more »

2017-05-18 19:05 (2) Answers

Foundation not working with create-react-app

I'm building an app with React and create-react-app. I want to use foundation-sites from npm. I do: import React, { Component } from 'react'; import jQuery from 'jquery'; import Foundation from 'foundation-sites'; At this point even with no furthe...
more »

2017-05-18 17:05 (2) Answers

React toggle component

I have this simple code below. When I press the Toggle Button the component Child should hide/show, but it's not. Do I have to re-render something? I don't want to switch in/out a CSS class, just toggle via a button click import React, {Component}...
more »

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

Role of QueryRenderer in Relay Modern?

So, first a bit of background. I'm a native iOS/Android developer who is now starting my first ever React Native project. It comes with all the benefits and pains of Javascript, but I like it a lot so far :-) I decided to also try my hand at GraphQL...
more »

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

In which branch should I build a docker image?

We have a react project that is based on react-static-boilerplate which will follow git DMZ flow and will make use of docker images. Does the build in git dmz flow pertains to yarn build? Since master and hotfix are deployed in production and relea...
more »

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