[FoodOrderApp] (https://swarnim-reactmeals.netlify.app/)
A simple Food Order App with ReactJs
- Created React App using create-react-app.
- Created multiple components and assets sections.
- Added a Header Component with background Image in Layout.
- Created, Added and styled the "Cart" Button Component in Layout and Header Component.
- Added Meals Components with dummy meals data and summarys.
- Added Individual Meal Items, created Card and meal components.
- Added Form, Input Component to MealItems
- Worked along Cart component and styling.
- Created a Overlay Modal for Cart Component via ReactPortal and passed to index.html via CreateReactPortal
- Implemented Cart with some dummy data and states, used props for reusability and scalability.
- Created Context for the Cart using ContextAPI and Provided it to all the components which needs the cart-context data.
- Used to Context in Header Cart Button, and assigned the total added items to the badge using Reducer() method.
- Added a Reducer function to the Cart Provider to update the items and amount in the context when added.
- Added forwardRef to input component to enable useRef for mealsForm, updated amount in cart consuming the addItems function from the context.
- Added CartItem module and tapped into the context, for adding products to the cart
- Improved the useReducer logic to update the cartItems quantity.
- Updated removeItems logic to allow products to be removed and decreased on cart.