What are FunctionExpression and FunctionDeclaration? What is their main difference?
Frontend
Get data about books and their authors. Display the data in a paginated list with 10 books per page in the format: <book title> - <author> api: [link] specification: [link] if swagger does not open, in the root sber-c55-books-mock-1.0.1-oas3.1-resolved.yaml const PAGE_SIZE = 10; export default function App() { const [books, setBooks] = useState([]) const [page, setPage] = useState(1); const [loading, setLoading] = useState(false) useEffect(() => { setLoading(true); fetch('[link]') .then((res) => res.json()) .then((data) => setBooks(data)) .finally(() => setLoading(false)); }, []); const totalPage = Math.ceil(books.length / PAGE_SIZE); const start = (page - 1) * PAGE_SIZE; const currentBooks = books.slice(start, start + PAGE_SIZE); return ( <div className="App"> {loading && <p>Loading...</p>} <ul> {currentBooks.map((book) => ( <li key={book.id}>{book.title} - {book.author}</li> ))} </ul> <button onClick={() => setPage((prev) => Math.max(prev - 1, 1))} disabled={page === 1}>Previous</button> <button onClick={() => setPage((prev) => Math.min(prev + 1, totalPage))} disabled={page === totalPage}>Next</button> </div> ); } Fix errors and implement paginated list display of books with authors.
Tell about your previous work experience and technologies used.
Why didn't you use localForage or another wrapper over IndexedDB?
What are the limitations on the amount of memory in IndexedDB and what do they depend on?
Why was IndexedDB chosen for storing drafts and scenario states instead of localStorage or sessionStorage?