Skip to content

Instantly share code, notes, and snippets.

@fakiolinho
Created April 19, 2018 09:22
Show Gist options
  • Save fakiolinho/f9b55e3525e37b27190082a1092b72ed to your computer and use it in GitHub Desktop.
Save fakiolinho/f9b55e3525e37b27190082a1092b72ed to your computer and use it in GitHub Desktop.
import React from 'react';
const renderItemsText = items => {
if (items.length > 0) {
return <p>Print sth since we have some items in our list</p>;
}
return null;
};
export default ({ items }) => (
<div>
{renderItemsText(items)}
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment