Subscribe to Continue Downloading

Redirecting...
Code javascript redux trang web thuong mai dien tu ban dien thoai 2 - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

by Loi VCTin , on October 6, 2022

Choose Your Desired Option(s)

Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

 

Code javascript redux trang web thuong mai dien tu ban dien thoai e commerce website to sell phones - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

 

Trang chủ

 

Code javascript redux trang web thuong mai dien tu ban dien thoai 2 - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones chi tiet san pham - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

 

Chi tiết sản phẩm

 

Gio hang cua ban - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

 

Giỏ hàng của bạn

 

Loc san pham - Code javascript, redux trang web thương mại điện tử bán điện thoại e-commerce website to sell phones

 

Lọc sản phẩm theo giá, sắp sếp tăng dần hoặc giảm dần, hãng điện thoại

 

yarn // Tải dependencies
yarn start // Khởi động project
  • Chia components:

    • atoms: Những component không phải là component page hay templates
    • pages: Là các trang routable từ react-router-dom
    • templates: Là các component share chung giữa các page như header, footer
  • Mỗi component sẽ gồm nhiều file gần nhau:

    • .comp.jsx: File component
    • .styled.js: File styling bằng styled-component
    • .utils.js: Các function util tách ra thành một file cho gọn file .comp.jsx
    • .data.js: Data giả (mock) liên quan đến component, sau này khi có data thật từ backend này kia có thể xóa file này
    • .test.js, .hooks.js,… tùy sáng tạo và sở thích cá nhân
  • Thư mục redux sẽ chia ra nhiều “miếng” (slices). Mỗi miếng sẽ gồm:

    • actions.js
    • reducer.js
    • selectors.js,
    • và có thể data.js,…
    • Khi truy xuất dữ liệu từ redux sẽ dùng useSelector + một selector từ selectors.js.
    • Khi dispatch một action sẽ dùng useDispatch + một action từ actions.js,…
    • Đọc thêm code mẫu để hiểu
  • Products data flow on product page: All products (might from the server) -> Filter by brands -> Filter by price -> Sorting -> Paging -> Display

  • Icon: Dùng icon ở trang https://ionicons.com/. File cdn để dùng icon đã được liên kết ở public/index.html, giờ chỉ cần dùng thôi. Tự search ion-icon trong project để xem cách dùng

  • Các page để routing sẽ được thêm vào file src/routes.js để tiện quản lý phòng trường hợp cần phát triển lên, sẽ có 1 nguồn thống nhất các routes

  • Git commit: Viết hoa chữ cái đầu, không có dâu chấm cuối câu.

  • Thư mục src/styles chưa các file config liên quan đến style. Có thể truy xuất ở các file .styled.js. Ví dụ ${(props) => props.theme.mixins.flexCenter}; sẽ import flexCenter từ file mixins.js. Khả năng cao với scope hiện tại sẽ không dùng nhiều, tuy nhiên vấn để đó, sẽ remove dần

Download Category ,
Product Version
File Type JS
File Size 531 KB
Developer
Documentation

Release Information

  • Released
    :

    October 6, 2022

  • Last Updated
    :

    October 6, 2022

  • Categories
    :
  • File Included
    :

    JS

  • File Size
    :

    531 KB

Share Your Valuable Opinions

You must log in to submit a review.

  • Sign up
Password Strength Very Weak
Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.
We do not share your personal details with anyone.

Please wait a moment...

(Don't refresh or go back)