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
PropType
Validation 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
state
to each<BuildControl />
&<BuildControls />
Component- Adding Ingredients Dynamically β Connecting
onClick
handler to theMore
button: Commit Details - Removing Ingredients Safely β Connecting
onClick
handler to theLess
button: Commit Details
- Adding Ingredients Dynamically β Connecting
- Displaying & Updating the
totalPrice
in 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.jsx
files: 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
axios
instance 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
withErrorHandler
Closure 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
ingredients
data 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
STORE
to the<App />
Component: Commit Details - Finishing the
REDUCER
for 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
purchasable
with 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 CREATORS
for<BurgerBuilder />
Component: Commit Details - Setting Up
redux-thunk
&Redux DevTools
to Execute Asynchronous Code: Commit Details - Fetching
ingredients
Asynchronously from the Firebase-Backend: Commit Details - Initializing
ingredients
in the<BurgerBuilder />
Component: Commit Details - Changing the Order of our
ingredients
Manually: Commit Details - Adding
ACTIONS
for 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
REDUCERS
in[./store/reducers/order.js]
&[./store/reducers/burgerBuilder.js]
: Commit Details - Handling Purchases & Updating the UI: Commit Details
- Resetting the
totalPrice
after Purchases: Commit Details - Fetching Orders via Redux & Refactoring the
REDUCERS
using 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 Creators
for 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
auth
State: 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
auth
State 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-16
npm 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