Git Product home page Git Product logo

redub's Introduction

Redub

a react REDUx Boilerplate

recommended usage

with redub-cli

# installation
$ npm i -g redub-cli

# create anew project
$ redub new testProject

# generate a new component
$ redub generate comp myNewComponent

Documentation for redub-cli click here

install & use

cd into root directory

$ npm install

run this for to copy index.html to dist and to bundle javascript and load to dist/js

$ npm run dev

run this for serving the index.html and the bundle.js on localhost:3000

$ npm run start

redux devtools

Simply install redux devtools extension for chrome and use all the features for debugging the application's state changes.

Devtools only work in development.

Folder Structure

.
+-- src
|   +-- config
|   |
|   +-- js
|   |   +-- actions
|   |   +-- components
|   |   +-- conainers
|   |   +-- reducers
|   |   +-- views
|   |   app.js
|   |
|   +-- scss
|   |
|   index.html
|
.babel.rc
.gitignore
package.json
readme.md
webpack.config.js

src directory

Inside here is the code for the complete redux application.

It holdes the following files & folders:

  • config: for now it only holdes the configuration for the API routes
  • js: basically is the redux application
  • scss: holdes the stylesheets for the application
  • index.html: is the only html file you need

config directory

Inside here all the configurations are set.

It holds the following files & folders:

  • apiRoutes.js: this file configures the url-path to the api (default: for development)

js directory

Inside here is all the javascript code for the redux application.

It holds the following files & folders:

  • actions: the complete logic of the redux application
  • components: the dumb just presentational components of the application (rarely have a state)
  • conainers: the intelligent conainer components (often statefull components)
  • reducers: the complete statemanagement for the redux application
  • views: the different views that are displayed to the user. Can consist of multiple components and/or containers
  • app.js: the entrypoint for the application

index.html

This is the only html file you need for the redux application. It holds a div with an id 'root' (here will the application render) and a script with the src 'js/bundle.js' which is the webpacked js code for the redux application.

redub's People

Contributors

aichbauer avatar

Watchers

James Cloos avatar  avatar  avatar

redub's Issues

Error on npm start

I get an error if I run npm start

ERROR in ./src/js/app.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./components/wrapper/app in /Users/janpeer/dev/redub/src/js
 @ ./src/js/app.js 25:11-46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.