This project is built using Next.js with TypeScript and Tailwind CSS. It features a search functionality that uses a custom useDebounce
hook to debounce user input, preventing frequent API calls. Additionally, a rewrite rule is added in next.config.js
to handle possible CORS errors.
- Clone the repository:
git clone https://github.com/Faraz1995/search-suggestion.git
- Navigate to the project directory:
cd yourproject
- Install the dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to
http://localhost:3000
.
Implemented using a custom useDebounce
hook to delay processing of user input, reducing the number of API calls.
Custom rewrite rules in next.config.js
to manage CORS errors.