Working with Electron and React Router 1.0


#1

I’m just getting started working with Electron w/ Webpack, React, and React-Router v1.0. I have React Router setup and working fine on a web app at work, but when I followed the same setup for electron, I get errors about unable toUpperCase() of undefined.

Anyway, I’ve seen some boilerplate packages that include older versions of React Router, but nothing yet with v1.0. Has anyone setup v1.0, or do you know of a boilerplate I can reference with v1.0 implemented? Any help will be appreciated.


#2

According to my experience, normally the error about toUpperCase() of undefine is caused by forgetting to export out the component, like this:

class Console extends Component {
    componentDidMount() {
    }
    render() {
        return (
            <div className="app">
            </div>
        )
    }
}
// probably miss the line below
export default Console;

And I am currently working with Electron and React-Router 1.0 and Redux, I think it is the same as in a browser, any boilerplate(no matter if it’s about Electron) can be used here.