Monday, 5 June 2017

main.js:808 Uncaught Error: _registerComponent(...): Target container is not a DOM element

Hi I am getting this error:

main.js:808 Uncaught Error: _registerComponent(...): Target container is not a DOM element.

I have visited this question, but I cannot figure out what is wrong with what I am doing.

Here is the code I have right now:

routes.js:

export default (  
  <Route path="/" component={App}>
    <IndexRoute component={HomePage} />
  </Route>
);

app.js

const store = configureStore();

render(
  <Provider store={store}>
    <Router history={browserHistory} routes={routes} />
  </Provider>,
  document.getElementById('app')
);

homepage.js

class HomePage extends React.Component {
  render() {
    return (
      <div id="app">
        Hello
      </div>
    );
  }
}

export default HomePage;



via seanscal

No comments:

Post a Comment