Guest User

Untitled

a guest
Jul 18th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function App() {
  2. return (
  3. <div className="App">
  4. <List
  5. renderList={({ list, isLoading }, fetch) => (
  6. <div>
  7. <button onClick={fetch}>Refresh</button>
  8. {isLoading && <h2>Loading...</h2>}
  9. <ul>
  10. {list.length > 0 && list.map(name => <li key={name}>{name}</li>)}
  11. </ul>
  12. </div>
  13. )}
  14. />
  15. </div>
  16. );
  17. }
Add Comment
Please, Sign In to add comment