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

offline-first-react-app

> 编程语言
开源

一个离线优先的 React 应用,可手动从离线客户端获取过时数据

100 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

一个离线优先的 React 应用,可手动从离线客户端获取过时数据

Offline-First React App

This repo is meant to act as a proof-of-concept. As a result, it may have bugs, incomplete features, styling issues, and other problems.

This is a proof-of-concept for an offline-first React app that interacts with a server.

It features:

  • A React app that only needs to fetch data once a day
  • Eager loading of data when the app is online
  • A server that uses a simple JSON file as a database
  • A list view of people that are in the "database"
  • A detail view of a person that doesn't require a network request
  • A "diff" view that encourages the user to select the new data when the server updates while the app is offline

Getting Started

To get started, run the following commands:

bash
yarn install
yarn dev

This will start the server and the client. The client will be available at http://localhost:3000.

How to Use It

The app is designed to be used in the following way:

  1. Open the app in a browser
  2. Disable the network connection
  3. Open a person's detail view
  4. Change the person's name
  5. Enable the network connection
  6. Watch the data be updated to the server

To see the diff view, follow these steps:

  1. Open the app in a browser
  2. Disable the network connection
  3. Open a person's detail view
  4. Change the person's name
  5. Open localhost:3000/updatedates in a new tab
  6. Press the "Update" button
  7. Enable the network connection on the first tab

Technologies Used

This app uses the following technologies:

  • Astro to easily consolidate the client and server into a single
  • React to build the UI
  • React Query to handle data fetching
  • HouseForm to build forms
  • React Router to handle routing
  • Redux to manage diffing of state data
  • Redux Toolkit to simplify Redux usage
  • Redux Persist to persist Redux state to local storage

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

TypeScript

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

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言