Archives : April-2016

Below codes report 404 not found when refreshing on page http://localhost/about. But if browserHistory is changed to hashHistory, it works fine. Here are my js file. import React, {Component} from ‘react’; import ReactDOM from ‘react-dom’; import { Router, Route, IndexRoute, Link, IndexLink, browserHistory, hashHistory } from ‘react-router’; import $ from ‘jquery’; class App extends Component ..

Read more

I have a PageBuilder component that dynamically builds edit/list pages according to a configuration file. I want to have dynamic routes (like "/collection/list", "/collection/edit/123123", "/dashboard", etc.) that use the same PageBuilder component. I’m having trouble getting this to work – if I’m in "/collection/list" for example, when clicking on a link to "/collection/edit/1231" doesn’t work. ..

Read more

I am looking for a way to change routes in reactJS using react-router when a user clicks a button. Here is the relevant code (details of components have been omitted for brevity) from my jsx file: var React = require(‘react’); var ReactDOM = require(‘react-dom’); var {Route, Router, IndexRoute, hashHistory, browserHistory} = require(‘react-router’); var {Link, IndexLink} ..

Read more

Using this boilerplate as reference I created an Electron app. It uses webpack to bundle the scripts and express server to host it. Webpack config is practically same as this and server this. Electron’s script loads: mainWindow.loadURL(‘file://’ + __dirname + ‘/app/index.html’); And index.html loads the script hosted by the server: <script src=”http://localhost:3000/dist/bundle.js”></script> I run electron ..

Read more