Giter Club home page Giter Club logo

react-redux-httprequests's Introduction

Redux Toolkit Cart (React.js - Redux Toolkit)

This web application is a very simple imitation of an online shopping cart. The user can select books from the dummy data list, put them in the cart and change the quantity of the selected items. All cart data connected to Firebase via http requests.

The goals of creating this application:

The main goals for me as a web developer were to improve my skills in working with:

  • implementing asynchronous http requests (fetching and posting cart data) using Redux Toolkit and action creator thunks;
  • the React-Redux hooks: useDispatch(), useSelector();
  • the React hooks: useEffect();
  • creating custom reusable components (e.g. Notification.js, Card,js);
  • the React props (data transfer from parents to children);
  • JavaScript logic and methods (filter(), find(), map(), fetch(), async-await, try-catch, json(), JSON.stringify(), etc);
  • CSS modules;

To view the app in the browser:

Copy and paste the following link to the URL address bar of your browser:

https://sharinlana.github.io/react-redux-httpRequests/

To start the app on your machine:

  1. Clone the project to your machine by running:
git clone https://github.com/SharinLana/react-redux-httpRequests.git
  1. To install the project dependencies, run:
npm install
  1. When the installation is complete, run the following command to start the app:
npm start

Languages, frameworks, libraries, packages, tools and technologies:

  • React.js
  • Redux Toolkit
  • React Redux
  • JavaScript
  • CSS modules
  • Firebase

Functionalities:

  • fetching the cart data from Firebase Realtime Database asynchronously on the first load of the page and displaying it in the cart component;
  • informing users about http request status dynamically;
  • adding selected products (books) to the cart;
  • dynamic display of the number of selected items in the cart;
  • dynamic change in the cost of the order as some items are added or removed from the cart;
  • adding and removing items directly in the cart;
  • sending the cart data (book titles, quantity, price) to Firebase and store it there ('PUT' method, which re-write the stored data each time when the cart states change);
  • displaying components conditionally (e.g. hide/reveal the cart on a button click);
  • responsive design (mobile adaptation);

react-redux-httprequests's People

Contributors

sharinlana avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.