Hi,
I’m trying to write a new website in Meteor + react. I’m following a tutorial which says that I should use createContainer on the main app component, but altering it to match the latest version of the bootstrap meteor+react code that was referenced in an earlier tutorial.
This has worked fine so far, until I tried to tie my data object to a mongo database, at which point I got “ReferenceError: LotsView is not defined” from the router.
Could you please help me?
Thank you!
Code below:
import React, { Component, PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import classNames from 'classnames';
import { Lots } from '../../api/api.js';
import LotView from './LotView.jsx';
class LotsView extends Component {
renderLots() {
return this.props.lots.map((lot) => (
));
}
render() {
return (
View Lots
{this.renderLots()}
);
}
}
LotsView.propTypes = {
lots: PropTypes.array.isRequired,
}
export default createContainer( () => {
return {
lots: Lots.find({}).fetch(),
}
}, LotsView );