> For the complete documentation index, see [llms.txt](https://reactjs.koida.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://reactjs.koida.tech/restful-apis-build-a-booksearch-app-ver-2.0.md).

# RESTful APIs :Build a BookSearch App -Ver 2.0

## Build a BookSearch App without Custom Hook

### Initial Steps

1. Create vite+react  project &#x20;

```bash
// Create Vite+React Project
$npm create vite@latest
>Project name : bookshelf
>Select a framework: >React
>Select a variant: >JavaScript
$cd bookshelf
```

2. Open the project with visual studio code and add a few dependencies

```bash
// Open the project
$code .
inside of vscode terminal
$npm install
$npm install bootstrap
$npm run dev
```

3. Open App.jsx and add the following library at top area.

```jsx
import 'bootstrap/dist/css/bootstrap.min.css';
```

4. Open index.html and add third-party stylesheet <mark style="color:orange;">bootstrap</mark> as shown below:

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">
```

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Book Shelf</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.jsx"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">

  </body>
</html>
```

5. Test  and check the BookShelf App by invoking the following:

```bash
// inside of vscode terminal
$npm run dev
```

6. Before we start making a new component,  open App.jsx file and  delete initial code created when initiated the new project except for the main App() function block.

````jsx
// App.jsx template

/** @format */

/**
 * NOTE:::
 * This is the code that would go into the project's main App.jsx
 * I put it here so that the main App.jsx is clean
 * as we are building other, small components throughout the
 * course.
 *
 */

import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import { useState } from 'react';

```javascriptreact
function App() {
...
  return (
  <>
  ...
  </>
  )
}
export default App;

````


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://reactjs.koida.tech/restful-apis-build-a-booksearch-app-ver-2.0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
