A React+Redux App for Building/Customizing a Burger with Meat, Bacon, Cheese & Salad. Live Here.
Read about installation and other details here
Read about deployment details here
The app's layout and component structure (react) has been designed at draw.io, and the basic design can be found here.
NOTE: There can be more additions into the design, over iterations of the Application.
Layout, Component & State Design: View
- Creating a
<Layout />Component: Commit Details - Initiating the implementation of
<BurgerBuilder />Container: Commit Details - Concept Art of the Burger using CSS: Code @CodePen
- Adding Dynamic
<BurgerIngredient />Component: Commit Details - Adding
PropTypeValidation for<BurgerIngredient />: Commit Details - Implementation of the
<Burger />Component: Commit Details - Outputting
<BurgerIngredients />Dynamically: Commit Details - Calculating the
<BurgerIngredient />Sum Dynamically usingreduce(): Commit Details - Adding the
<BuildControl />&<BuildControls />Component: Commit Details - Outputting Multiple
<BuildControl />components using the<BuildControls />Component: Commit Details - Connecting
stateto each<BuildControl />&<BuildControls />Component- Adding Ingredients Dynamically β Connecting
onClickhandler to theMorebutton: Commit Details - Removing Ingredients Safely β Connecting
onClickhandler to theLessbutton: Commit Details
- Adding Ingredients Dynamically β Connecting
- Displaying & Updating the
totalPricein the<Burger />Component: Commit Details - Implementing and adding the
<OrderButton />: Commit Details - Creating the
<OrderSummary />Modal Component: Commit Details - Showing/Hiding the
<OrderSummary />Modal Component w. Animation: Commit Details - Implementing a
<Backdrop />Component: Commit Details - Adding a Custom Button
<StyledButton />Component: Commit Details - Implementing the Functionality of the
<StyledButton />Component: Commit Details
- Adding a
<Toolbar />Component: Commit Details - Using & Adding a
<Logo />in our Application: Commit Details - Adding Reusable
<NavigationItem />inside<NavigationItems />: Commit Details - Creating a Responsive
<SideDrawer />Component: Commit Details - Working on Responsive Adjustments for the
<SideDrawer />Component: Commit Details - Responsive Adjustments on
<NavigationItem />&<NavigationItems />Components for the<SideDrawer />Component: Commit Details - Reusing the
<Backdrop />Component for the<SideDrawer />Component: Commit Details - Adding a
<DrawerToggle />Component to toggle the<SideDrawer />Component: Commit Details - Adding a Hamburger Icon for the
<DrawerToggle />Component: Commit Details
- Improving the Overall Application using
shouldComponentUpdate()for<Modal />Component & Removing unnecessary.styled.jsxfiles: Commit Details - Responsive Styling Changes in the
<Layout />,<BuildControls />&<BurgerBuilder />Components && Adding<Wrapper />UI Component to Make Use of CSS Grid: Commit Details
Firebase Common API Endpoint: https://burger-builder-ram.firebaseio.com/
- Creating a Firebase Realtime Database: Firebase DOCS
- Creating the
axiosinstance to access our DB: Commit Details - Sending a POST Request using
axios.post(): Commit Details - Displaying a Spinner while sending a POST Request: Commit Details
- Handling Errors Globally using the
<Modal />Component inside the<withErrorHandler />Closure HOC: Commit Details - Retrieving Data from the Firebase Backend & Resetting Error Handler inside
withErrorHandlerClosure HOC inside theconstructor()lifecycle method: Commit Details - De-allocating Previously Allocated Interceptors to Different Respective Components using
axios.interceptors.request/response.eject(axiosInstance): Commit Details - Resetting the
<BurgerBuilder />Component to show in App.js: Commit Details
API Endpoint to fetch Orders: https://burger-builder-ram.firebaseio.com/orders.json
- Building the
<Checkout />&<CheckoutSummary />Components: Commit Details - Setting Up Routing & Routes
npm i --save react-router-dom: Commit Details - Navigating to the Checkout Page: Commit Details
- Navigating Back & To Next Page: Commit Details
- Passing
ingredientsdata via Query Params usingURLSearchParams()&encodeURIComponent()methods: Commit Details - Navigating to the
<ContactData />Component: Commit Details - Order Submission & Passing Data Between Pages using
withRouter()HOC: Commit Details - Adding a
<Order />Component inside<Orders />Container (Page): Commit Details - Implementing Navigation Links using
<NavLink />Component: Commit Details - Fetching Orders from the Firebase Backend: Commit Details
- Outputting the Orders: Commit Details
- Creating a Custom Dynamic
<Input />Component: Commit Details - Setting-up JS Config for the Form in
<ContactData />Component: Commit Details - Creating
<Input />Components Dynamically, based on the JS Config, inside the<ContactData />Component: Commit Details - Adding a Drop Down Component for
<ContactData />Component inside<Input />Component: Commit Details - Handling User Input: Commit Details
- Handling Form Submission: Commit Details
- Adding Custom Form Validation: Commit Details
- Fixing a Common Validation Gotcha using Interpolation: Commit Details
- Adding Validation Feedback for UI: Commit Details
- Improving Visual Feedback: Commit Details
- Handling Overall Form Validity: Commit Details
- Fixing an Error Related to Drop Down Component's State in
<ContactData />: Commit Details - Fixing a Minor Bug: Commit Details
Dependency Installation: npm i --save redux react-redux
- Setting Up Redux
STORE,REDUCER&ACTIONs: Commit Details - Connecting the Redux
STOREto the<App />Component: Commit Details - Finishing the
REDUCERfor Ingredients: Commit Details - Connecting the
<BurgerBuilder />Container to ReduxSTORE: Commit Details - Working on the
totalPrice's state in ReduxSTORE: Commit Details - Updating local UI state
purchasablewith simple logic && maintaining Redux & UI State separately: Commit Details - Adjusting
<Checkout />&<ContactData />Components using Redux STORE: Commit Details
Dependency Installation: npm i --save redux-thunk
- Installing the Redux Devtools: Commit Details
- Preparing the Folder Structure to use
ACTION CREATORS: Commit Details - Creating
ACTION CREATORSfor<BurgerBuilder />Component: Commit Details - Setting Up
redux-thunk&Redux DevToolsto Execute Asynchronous Code: Commit Details - Fetching
ingredientsAsynchronously from the Firebase-Backend: Commit Details - Initializing
ingredientsin the<BurgerBuilder />Component: Commit Details - Changing the Order of our
ingredientsManually: Commit Details - Adding
ACTIONSfor Orders: Commit Details - Connecting
<ContactData />Container & Order ACTIONS: Commit Details - The Order
REDUCER: Commit Details - Working on Order
ACTIONS: Commit Details - Redirect in
<ContactData />to Improve UX: Commit Details - Combining
REDUCERSin[./store/reducers/order.js]&[./store/reducers/burgerBuilder.js]: Commit Details - Handling Purchases & Updating the UI: Commit Details
- Resetting the
totalPriceafter Purchases: Commit Details - Fetching Orders via Redux & Refactoring the
REDUCERSusing Custom Utility Function(s): Commit Details - Making a Leaner Switch Case by Refactoring Code in
REDUCERS: Commit Details
- Adding an
<Auth />Container Form: Commit Details - Adding
ACTION Creatorsfor the Auth Form: Commit Details - Getting a Token from the Backend for Sign-Up: Commit Details
- Adding Sign-In for Authorized Users: Commit Details
- Storing the Response Token from Sign-In/Sign-Up: Commit Details
- Adding a
<Spinner />UI Component for Sign-In & Showing Errors on the View: Commit Details - Logging Users Out: Commit Details
- Accessing Protected Resources by Setting Up Rules in Firebase π₯: Commit Details
- Updating the UI Depending on
authState: Commit Details - Adding a Logout Link: Commit Details
- Forwarding Unauthenticated Users: Commit Details
- Redirecting the User to the Checkout Page (In case the User is New and has Built a Burger w/o Login/Signup): Commit Details
- Persistent
authState withlocalStorage&& Fixing Routing Errors usingwithRouter()fromreact-router: Commit Details - Guarding Routes: Commit Details
- Displaying User Specific Orders: Commit Details
- Fixing the Redirect to the Front Page: Commit Details
- Sharing the Validation Method into
shared/utility.js: Commit Details - Using Environment Variables with the help of
process.env.NODE_ENV: Commit Details - Removing
console.log()statements: Commit Details - Adding Lazy Loading: Commit Details
Test Runner is Jest & JavaScript Testing Utility is Enzyme.
Installing Dependencies:
npm install --save enzyme react-test-renderer enzyme-adapter-react-16npm install --save-dev jest
Note: If cra is used to create the react app, jest will be pre-installed.
- Testing Functional Components using
describe(),it() / test()&expect(): Commit Details - Testing Functional Components Continued: Commit Details
- Using the enzyme's
contains()method to test for a specific sub-component inside a component: Commit Details - Testing Containers: Commit Details
- How to Test Redux: Commit Details