Skip to content

Instantly share code, notes, and snippets.

@joshmrallen
Last active August 26, 2018 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshmrallen/d5ca673857c11a9212798ed3e658da08 to your computer and use it in GitHub Desktop.
Save joshmrallen/d5ca673857c11a9212798ed3e658da08 to your computer and use it in GitHub Desktop.
import React from 'react';
import './BusinessList.css';
import Business from '../Business/Business';
class BusinessList extends React.Component {
render() {
return(
<div className="BusinessList">
{
this.props.businesses && this.props.businesses.map(business => {
return <Business business={business} key={business.id} />
})//made a slightly more dynamic business list by accessing an array of businesses
}
</div>//end div
);//end of return statement
}//end of render method
}//end of BusinessList component
export default BusinessList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment