Sample CA 2 Questions
Sample CA 2 Questions
4. Develop a form that captures user information (name, email) and displays it back
after submission.
5. Fetch data from an API (e.g., weather data) and display it in a visually appealing
format.
6. Build a product card component that displays product details and allows users to
add the item to a shopping cart (using state management).
10. Create a custom hook that simplifies fetching data from an API and handling
loading/error states.
11. Develop a simple routing system using React Router to navigate between
different pages in your application.
12. Implement a photo carousel component that automatically transitions between
images with smooth animations.
Interactive Elements:
3. Number List: Create a component that displays a list of numbers (1-5). Clicking a
number changes the background color of the clicked item. (Uses state to keep track of
the selected number)
4. Simple Calculator: Develop a basic calculator component with buttons for addition,
subtraction, and displaying the current result. (Uses state to store the current value and
perform operations)
Conditional Rendering:
5. Login Form: Build a login form with username and password fields. Conditionally
display a success message if the username is "admin" and password is "secret".
6. Age Check: Create a component that asks for the user's age. Based on the input,
display a message like "Welcome!" (age >= 18) or "Sorry, you are too young" (age <
18).
Event Handling: