A virtual meal ordering site.
-
Add / Remove items
-
The Hooks I used:
- useContext: gathering cart related data and provide to all of components, they can reach context easily.
- useEffect: Fetching data from localstorage in first render, and adding animation on cart button when amount of items changes.
- useReducer: any update in cart will also update miltiple state (cartItems, orderAmount), to help us clean up the code, take advantage of useReducer.
- useState: controll simple state change.
-
-
Storage data into localStorage
-
RWD design so you can use on any device.
- Adding extension page fot delivery info form.
- move modal related state & handle to context.
- Adding Card UI component and replace part of List UI component with it.
- RWD optimazation.
- instead of dealing with data through localstorage, we storage data on firebase and process them. replace all code relating to localstorage to fetch API.
- Adding form of delivery info, which contains input value validation, error message. (with custom hooks help)