This is a simple React application that allows users to add ingredients to a list and generates a prompt to create a recipe once a certain number of ingredients have been added.
- Add Ingredients: Users can add ingredients to a list.
- Ingredient Validation: Checks if an ingredient is already added and ensures the input is valid.
- Recipe Prompt: If more than three ingredients are added, users can generate a recipe based on their ingredients.
-
Clone the repository:
git clone https://github.com/<your-username>/<repository-name>.git cd <repository-name>
-
Install the required dependencies:
npm force install
-
Start the development server:
npm start
-
Open your browser and go to
http://localhost:3000to see the application in action.
- src/
- Main.js: Contains the main logic for adding ingredients and rendering the ingredient list.
- App.js: Entry point of the application (includes
Main.js). - styles.css: Styles for the application (optional if you want to add your own).
react: JavaScript library for building user interfaces.react-dom: React's DOM package for web applications.