fedeagripa / TargetMVD_React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Redux Base

Npm commands

  1. Run the app. npm start -s
  2. Build the app. npm run build
  3. Lint the app. npm run lint
  4. Test the app. npm run test

Getting Started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Create two constants files in ./src folder(devConstant.js and prodConstants.js):
  • devConstants is used while you are developing(on npm start script)
  • prodConstats is used once you build the app(on npm run build script)

Those files should include the API_URL constant.

devConstants.js or prodConstants.js example:

export const config = {
  API_URL: 'http://your-api-url.com'
};
  1. Start the dev server: npm start -s

Initial Machine Setup

Install Node 4.0.0 or greater - (5.0 or greater is recommended for optimal build performance). Need to run multiple versions of Node? Use nvm.

##Deploying to AWS S3

  1. Install AWS CLI
  2. Configure AWS with the command aws configure
  3. Set the buckets for your app in the script /tools/deployS3.js
  4. Run the command to deploy npm run deploy:staging or npm run deploy:production

Technologies

Tech Description
React Fast, composable client-side components.
Redux Enforces unidirectional data flows and immutable, hot reloadable store. Supports time-travel debugging.
React Router A complete routing library for React
Babel Compiles ES6 to ES5. Enjoy the new version of JavaScript today.
Webpack Bundles npm packages and our JS into a single file. Includes hot reloading via React Hot Loader.
Express Fast, unopinionated, minimalist web framework for node.
Jest Automated tests with built-in expect assertions and Enzyme for DOM testing without a browser using Node.
ESLint Lint JS. Reports syntax and style issues. Using eslint-plugin-react for additional React specific linting rules.
SASS Compiled CSS styles with variables, functions, and more.
PostCSS Transform styles with JS plugins. Used to autoprefix CSS
Editor Config Enforce consistent editor settings (spaces vs tabs, etc).
npm Scripts Glues all this together in a handy automated build.
Stylelint Modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.
LocalForage Fast and simple storage library, improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL)
ReduxForm Redux-form works with React Redux to enable an html form in React to use Redux to store all of its state.
Isomorphic Fetch Is a Promise-based mechanism for programatically making web requests in the browser.
Validate.js Provides a declarative way of validating javascript objects.
Humps Underscore-to-camelCase converter (and vice versa) for strings and object keys in JavaScript.

About


Languages

Language:JavaScript 89.7%Language:CSS 7.7%Language:HTML 2.6%