Why am I getting .map is not a function error?


#1

I’ve stepped through leveluptuts Meteor/React slowly but seem to have got far enough in that the comments sections contain tumbleweed only…

Can anyone help me with why I am getting ‘.map is not a function’ error message for this -

auctions() {
	return Auctions.find().fetch;

}

render() {
	let auc = [];
	return (
		<div>
			<h1>My Auctions</h1>
			
			<AuctionsForm />
			<div>
				<ul>
					{this.auctions().map ( (auction)=>{
						return <AuctionSingle auction={auction} />
					})}
				</ul>
			</div>
		</div>

	)

}

}


#2

You have an error in your fetch - it should be .fetch()


#3

Thank you so much… schoolboy error