Skip to content

Instantly share code, notes, and snippets.

@jepras
Last active October 24, 2018 20:30
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 jepras/22e2de834a97d2cd250615fb383e5fd4 to your computer and use it in GitHub Desktop.
Save jepras/22e2de834a97d2cd250615fb383e5fd4 to your computer and use it in GitHub Desktop.
return (
<ul>
{items.map(item => (
<li key={item.ID}>
{item.title}
{item.content}
</li>
))}
</ul>
);
if (error) {
return <div>Error: {error.message}</div>;
} else if (!isLoaded) {
return <div>Loading...</div>;
} else {
return (
<ul>
{items.map(item => (
<li key={item.ID}>
{item.title}
{item.content}
</li>
))}
</ul>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment