meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

{render} is not a function #175

Closed JohnAllen closed 7 years ago

JohnAllen commented 8 years ago

I had to use the following code to get the example to work. Doing import {render} from 'react-dom' said render was not a function. Not sure if this is a version or release issue, but hopefully it helps someone and could maybe be changed in a future version of this app if others run into this.

So the following is my main.js:

import { Meteor } from 'meteor/meteor';
import ReactDOM from 'react-dom';
import { renderRoutes } from '../imports/client/routes.jsx';

import '../imports/startup/accounts-config.js';

Meteor.startup(() => {
  ReactDOM.render(renderRoutes(), document.getElementById('app'));
});
hwillson commented 7 years ago

This is no longer an issue in the most recent versions of the react branch - closing.