Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 28th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { useState, useEffect } from 'react';
  2. import BookList from './BookList';
  3.  
  4. const BookListContainer = () => {
  5.   const [books, setBooks] = useState([]);
  6.   const [isLoading, setLoading] = useState(false);
  7.  
  8.   useEffect(() => {
  9.     setLoading(true);
  10.     fetch('/api/books')
  11.       .then(res => res.json())
  12.       .then(books => {
  13.         setBooks(books);
  14.         setLoading(false);
  15.       });
  16.   }, []);
  17.  
  18.   return <BookList books={books} isLoading={isLoading} />;
  19. };
  20.  
  21. export default BookListContainer;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top