Skip to content

Instantly share code, notes, and snippets.

@timbrandin
Last active February 1, 2016 08:17
Show Gist options
  • Save timbrandin/2c23d0e0da59e9a18790 to your computer and use it in GitHub Desktop.
Save timbrandin/2c23d0e0da59e9a18790 to your computer and use it in GitHub Desktop.
import React from 'react';
import {Template, each} from 'react-template-helpers';
Template.Welcome = ({friends}) => (
<div>
Hello, these are my friends:
{each(friends, friend =>
<div>{friend.name}</div>
).else(
<div>I have no friends</div>
)}
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment