Need help with preact-redux-example?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

developit
198 Stars 53 Forks 25 Commits 6 Opened issues

Description

:repeat: Preact + Redux Example Project

Services available

!
?

Need anything else?

Contributors list

# 1,081
JavaScr...
Express
worker
webwork...
14 commits
# 80,196
HTML
TypeScr...
React
Redux
2 commits
# 15,080
rabbitm...
Vue.js
vuex
localst...
1 commit

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

1. Clone this repo:

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

2. Make it your own:

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

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

3. Install the dependencies:

npm install

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

Development Workflow

4. Start a live-reload development server:

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
:

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:
class Link extends Component {
  render({ to, children }) {
    return { children };
  }
}
// usage:
Home

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.