Which brackest should be used where ? square brackets or curly braces while object destructuring ? I'm tyring to use context but bit confused

This is my context and I want to use it in my BookList component.

import React, { createContext, useState } from "react"
import { v4 as uuidv4 } from "uuid"

export const BookContext = createContext()

const BookContextProvider = (props) => {
  const [books, setBooks] = useState([
    { title: "Deek Work", author: "Cal Newport", id: 0 },
    { title: "Principles", author: "Ray Dalio", id: 1 },
    { title: "Sapiens", author: "Yuval Noah Harari", id: 2 },
    { title: "Grit", author: "Angela Duckworth", id: 3 },
    { title: "Ikagai", author: "Hector Garcia", id: 4 },
  ])

  const addBook = (title, author) =>
    setBooks([...books, { title, author, id: uuidv4() }])

  const removeBook = (id) => setBooks(books.filter((book) => book.id !== id))

  return (
    <BookContext.Provider value={{ books, addBook, removeBook }}>
      {props.children}
    </BookContext.Provider>
  )
}

export default BookContextProvider

The BookList component:

import React, { useContext } from "react"
import { BookContext } from "../contexts/BookContext"

const BookList = () => {
  const { books } = useContext(BookContext)
}

Why the books variable is inside the curly braces and not square braces ? even though the state i.e books is created with useState hook is an array.