Giter Club home page Giter Club logo

express-react-redux-starter's People

Contributors

pierrenel avatar tomkochievi avatar vieiralucas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

express-react-redux-starter's Issues

Heroku deployment tweaks

  • It's missing the PM2 dependency for production in package.json. Add "pm2": "^2.1.6"
  • Add the hook: "postinstall": "rm -rf dist && webpack --config ./webpack/webpack-prod.config.js --colors"
  • Move most of the dev-dependencies to dependencies, as Heroku will need them to build the app

Add Object Spread from ES7

While working with Redux I've found it tremendously helpful to use the spread operator ... in my reducers as suggested by Dan Abramov in Getting Started with Redux. Adding it allows one to do the following:

return {
  ...state,
  currentTime: action.time,
}

Instead of:

return Object.assign({}, state, {
  currentTime: action.time,
});

Object.assign is called under the hood.

If you'd like to add to this kit just npm i -D transform-object-rest-spread eslint-plugin-prefer-object-spread and update the Babel config as such:

{
  "presets": ["react", "es2015", "stage-1"],
  "plugins": [
    "transform-object-rest-spread"
  ]
}

And change your ESLint config file to:

{
  "extends": "airbnb",
  "parserOptions": {
    "ecmaVersion": 6,
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true
    }
  },
  "plugins": [
    "prefer-object-spread"
  ],
  "rules": {
    "prefer-object-spread/prefer-object-spread": "error"
  },
}

The ESLint plug-in and rule are optional.

npm run start pm2: not found

Hello,

I just try this starter kit, when I run npm run start i got this error sh: 1: pm2: not found
any ide ?

Thanks before

Use source-map devtool for Webpack

This kit is good for getting started; I really appreciate the minimalism. Thanks for putting it together.

In my experience cheap-eval-source-map has never rendered source maps correctly, and I'm seeing the same behavior with this starter kit in Chrome 51. After updating the Webpack devool to source-map and restarting dev, source maps function as expected. And they're super helpful. Might be a good addition to the kit.

Debugging Redux

Debugging Redux can go in a few different directions. Right now I'm using the chrome extension to debug alongside remote devtools.

Here's how to get it going:

Install the Chrome extension and then npm i -D remote-redux-devtools. Then create a file called /store/configureStore.js in the src/app directory with the following contents:

import { createStore, applyMiddleware, compose } from 'redux'
import devTools from 'remote-redux-devtools'
import reducer from '../reducers'

export default function configureStore(initialState) {
  const enhancer = compose(
    applyMiddleware(),
    devTools()
  )
  return createStore(reducer, initialState, enhancer)
}

And finally update src/app/index.js to use the new configureStore method:

import configureStore from './store/configureStore'

import './components/bundle.scss'

const store = configureStore()

It might take a little more configuration (i.e. for react-router-redux), but that's the gist of it. Hope it's helpful!

HMR vs React Hot Loader

Was curious why full page refresh hot loading (not that it is "bad") was chosen versus the HMR which would update components on the fly w/out a full page reload.

Images and SVGs

Hi Dimitri,

Thanks for this nice boilerplate. I have a question. Where would you put the images and SVGs to make them work for both environment, dev and production.

Thanks

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.