When a variable is defined using ref(), its value should be accessed using .value. In your case, the access using .value is missing for books and itemsPerPage.
ref()
.value
books
itemsPerPage