百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

clean-architecture-react

> 前端框架
开源

使用 React.js 的清洁架构示例

191 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

使用 React.js 的清洁架构示例

Clean Architecture React

This project is an experiment in applying clean architecture with React.

Important

Inside a React context, Clean Architecture will always be some kind of adaption. The key is separation of concerns and decoupling dependencies. In addition, the project originated as an example for personal study, if you want to make a suggestion go ahead and PR!

Architecture

Models

  • User
  • Todo

Repositories

  • TodoRepository
  • UserRepository

DataSources

  • User
    • UserAPIDataSource (From a REST API)
  • Todo
    • TodoAPIDataSource (From a REST API)
    • TodoLocalStorageDataSource (From Browser Local Storage)

UseCases

  • useClearTodos
  • useCreateTodo
  • useFetchTodos
  • useFetchUsers

These use cases are implemented using react-query, a library for fetching and caching data in React applications.

The Todo model has two data source implementations available: one using a REST API and the other using local storage.

Services

  • Http (Abstraction over axios)
  • Notification (Abstraction over alert)
  • Logger (Abstraction over console.log)

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptclean-architectureclean-codereactjs

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架