Ever wondered how does a simple Text Search is being implemented where a person just type the text he/she wants to search and the text appears in highlighted format. This project is a small step towards this idea.
Presenting you the Text Search Web App 📄✨: Empower users to effortlessly view and search text content within .txt files, facilitating seamless navigation and content discovery.
This repository contains a Vite-powered React application. Follow the instructions below to set up and run the app locally.
- Clone the Repository:
git clone https://github.com/Shivam-0407/Text-Search-Web-App.git
- Navigate to Project Directory :
cd Text-Search-Web-App
- Install Dependencies :
npm Install
- Start the Development Server :
npm run dev
- Click on the link provided in your terminal to run it locally
demo.mp4
- Highlights the text that the user wants to search dynamically
- Counts the total number of words present in your text file
- Counts the total number of occurences of the searched text
This project is completely dependent on how one can use the idea of hooks provided by the React library. Two of the important hooks used in this project are -
The useState hook is a React feature that enables functional components to manage state. It allows developers to create and update state variables within functional components, thus facilitating dynamic and interactive user interfaces.
The useRef hook is a React feature that provides a way to persist mutable values across component renders. It returns a mutable ref object whose .current property can hold a mutable value that persists between renders.