npm install
npm start
- localhost:1234
npm build
For Chrome Windows chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
For Chrome MacOS - open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
For Brave MacOS - open -n -a /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser --args --user-data-dir="/tmp/brave_dev_sess_1" --disable-web-security
This App is not made using Creat React App.
We have used Parcel as bundler. We used Browserslist to allow App to support only last 2 Chrome & FireFox version.
This App is inspired by Swiggy, We even use actual Swiggy API to get data for Restaurants and it's menu.
- Home - Fetch the data from Swiggy API to get list of Restaurants.
- Restaurant Menu - Fetch the data from Swiggy API, to get Menu Items.
- About us - Displays data of Developer (me), fetched using GitHub API.
- Grocery - Created using Lazy Loading concept.
- Add to Cart - We use Redux to centralised the data for the items added to cart.
- Use RTK Query to fetch data and cache it, to prevent making multiple API calls when navigating away.
- Give option to Search for Restaurant & Filter Restaurants.
- Username input update the user's name, made using React Context.
- The (code of )component gets loaded only when we navigate to it.
- Dev Build
- Local Server
- HMR = Hot Module Replacement (Refresh page)
- File Watching Algorithm - in C++
- Caching -> Faster Builds
- Image Optimization
- Minification of Files
- Bundling of Files
- Compress
- Consistent Hashing
- Code Splitting
- Differential Bundling - support older browsers
- Diganostic
- Error Handling
- Host on HTTPs
- Tree Shaking - remove unused code
- Different Dev & Prod Bundles
Header
- Logo
- Nav items Body
- Search
- RestaurantContainer - Restaurant Card - Img - Name of the Restaurant - Rating (star) - Cuisine - ETA Footer
- Copyright
- Links
- Address
- Contact
- Default Export/Import
export default Component
import Component from "./path"
- Named Export/Import
export const Component
import { Component } from "./path"
- Install
@reduxjs/tookit
&react-redux
- Build our Store
- Connect our Store to our App
- Slice (cartSlice)
- Dispatch (action)
- Selector