项目 / jeffersonRibeiro/react-shopping-cart

jeffersonRibeiro/react-shopping-cart

行业推荐
语言 TypeScript标签 reactecommerceecommerce-cart-applicationreact-shopping-cartshopping-carttypescriptreact-contextreact-hooksstyled-componentsreactjsjavascriptfirebase数据更新 2026-11-20 06:49:16 · 仓库 2026-11-19

一段话介绍

用 TypeScript、React Hooks、Context 和 Styled Components 编写的简易购物车示例,用来演示在电商界面里即时更新购物车状态。源文写明可用 Context 向浮动购物车添加或移除商品,并按尺码筛选,界面为响应式。可先看[在线演示](https://react-shopping-cart-67954.firebaseapp.com/),或按[仓库 README](https://github.com/jeffersonRibeiro/react-shopping-cart)执行 `npm install` 与 `npm start` 在本地运行。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
🛍️ Simple ecommerce cart application built with Typescript and React
2,579累计星
1,160Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

电商交易与订单履约

适配系统:交易中台、订单履约系统 · 得分 2.8

内置商品、购物车、订单与支付对象模型,可作为电商交易中台直接改造复用。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
可直接在 CodeSandbox 上试用和体验该购物车项目的代码,无需本地搭建。
特点或设计要点
该项目支持通过 Context API 向浮动购物车添加或移除商品、按尺码筛选商品,并采用响应式设计。
局限和适用边界
该购物车项目基于 Node.js 和 NPM 运行,需先执行 npm install 安装依赖,再用 npm start 启动 React 应用,测试通过 npm run test 运行。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-08-12 · 语言 TypeScript · 贡献者 —
typescript

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 1,656 字节。

## 🛍️ Simple ecommerce cart application [![CircleCI](https://circleci.com/gh/jeffersonRibeiro/react-shopping-cart.svg?style=svg)](https://circleci.com/gh/jeffersonRibeiro/react-shopping-cart)

<p align="center">

  <img src="./readme-banner.png">
</p>

## Basic Overview - [Live Demo](https://react-shopping-cart-67954.firebaseapp.com/)

<p align="left">

  <img src="./work-in-the-netherlands.png" width="380" height="90">
</p>

✈️ [Follow Jeremy Akeze](https://www.linkedin.com/in/jeremy-akeze-9542b396/)

This simple shopping cart prototype shows how React with Typescript, React hooks, react Context and Styled Components can be used to build a friendly user experience with instant visual updates and scaleable code in ecommerce applications.

#### Features

- Add and remove products from the floating cart using Context Api
- Filter products by available sizes using Context Api
- Responsive design

<!--
## Getting started

Try playing with the code on CodeSandbox :)

[![Edit app](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/74rykw70qq)
 -->

## Build/Run

#### Requirements

- Node.js
- NPM

```javascript

/* First, Install the needed packages */
npm install

/* Then start the React app */
npm start

/* To run the tests */
npm run test

```

### Copyright and license

The MIT License (MIT). Please see License File for more information.

<br/>
<br/>

<p align="center"><img src="http://www.jeffersonribeiro.com/assets/img/apple-icon-180x180.png" width="35" height="35"/></p>
<p align="center">
<sub>A little project by <a href="http://www.jeffersonribeiro.com/">Jefferson Ribeiro</a></sub>
</p>
↑