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

preact-redux-example

> 前端框架
开源

:repeat: Preact + Redux 示例项目

198 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

:repeat: Preact + Redux 示例项目

Preact Redux Example

A 9kb Preact + Redux boilerplate built with Preact CLI, implementing a To-Do List app.

As of v2, now wonderfully simplified via preact-redux (no more preact-compat!).


Quick-Start Guide

  • Installation
  • Development Workflow
  • Structure

Installation

1. Clone this repo:

bash
git clone https://github.com/developit/preact-redux-example.git my-app
cd my-app

2. Make it your own:

bash
rm -rf .git && git init && npm init

:information_source: This re-initializes the repo and sets up your NPM project.

3. Install the dependencies:

bash
npm install

You're done installing! Now let's get started developing.

Development Workflow

4. Start a live-reload development server:

bash
PORT=8080 npm run dev

This is a full web server nicely suited to your project. Any time you make changes within the src directory, it will rebuild and even refresh your browser.

5. Generate a production build in ./build:

bash
npm run build

You can now deploy the contents of the build directory to production!

Example: deploy to surge.sh:

npm i surge && surge build -d my-app.surge.sh


Structure

Apps are built up from simple units of functionality called Components. A Component is responsible for rendering a small part of an application, given some input data called props, generally passed in as attributes in JSX. A component can be as simple as:

javascript
class Link extends Component {
  render({ to, children }) {
    return { children };
  }
}
// usage:
Home

License

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

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

> 标签

JavaScriptdemopreactpreact-clipreact-demos

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

> 工具信息

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

> 相关工具

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