All Projects β†’ jonidelv β†’ Generator Create Redux App

jonidelv / Generator Create Redux App

Licence: mit
Add redux, emotion-js and other useful libraries like react-router in top of create-react-app

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Generator Create Redux App

Next Js Blog Boilerplate
πŸš€ Nextjs Blog Boilerplate is starter code for your blog based on Next framework. ⚑️ Made with Nextjs, TypeScript, ESLint, Prettier, PostCSS, Tailwind CSS.
Stars: ✭ 134 (-2.19%)
Mutual labels:  starter, boilerplate
Go Postgres Jwt React Starter
A go, gin, and postgres API with jwt auth, complete with a react frontend
Stars: ✭ 115 (-16.06%)
Mutual labels:  starter, boilerplate
Web Extension Starter
Typescript, React, Redux, Styled-Component and Webpack based sample extension boilerplate. Runs on Chrome and Firefox. Sample chrome extension.
Stars: ✭ 115 (-16.06%)
Mutual labels:  starter, boilerplate
Searchkit Starter App
Searchkit starter app. Based off create-react-app
Stars: ✭ 110 (-19.71%)
Mutual labels:  create-react-app, boilerplate
React Mobx State Tree
Create React App with MobX State Tree, Styled Components and GraphQL
Stars: ✭ 127 (-7.3%)
Mutual labels:  create-react-app, boilerplate
Alpha
Craft your own web-based chatbot
Stars: ✭ 113 (-17.52%)
Mutual labels:  boilerplate, scaffolding
Express Rest Boilerplate
βŒ›οΈ Express starter for building RESTful APIs
Stars: ✭ 1,794 (+1209.49%)
Mutual labels:  starter, boilerplate
Gatsby Starter Procyon
An opinionated Gatsby starter designed for trash-eating pandas.
Stars: ✭ 88 (-35.77%)
Mutual labels:  starter, boilerplate
Laravel Hackathon Starter
πŸ’» A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+1059.85%)
Mutual labels:  starter, boilerplate
Rest
REST API generator with Node.js, Express and Mongoose
Stars: ✭ 1,663 (+1113.87%)
Mutual labels:  boilerplate, yeoman-generator
Bootstrap 4 Sass Gulp 4 Boilerplate
A Bootstrap 4.5.2 boilerplate with font-awesome, sass, gulp 4 tasks
Stars: ✭ 103 (-24.82%)
Mutual labels:  starter, boilerplate
React Native Template
Minimal template with best practices and automation scripts for improved developer experience.
Stars: ✭ 131 (-4.38%)
Mutual labels:  starter, boilerplate
Formidable React Starter
React starter application
Stars: ✭ 97 (-29.2%)
Mutual labels:  starter, boilerplate
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+1199.27%)
Mutual labels:  starter, boilerplate
Node Typescript Mongodb
node js typescript mongodb express generator yo
Stars: ✭ 96 (-29.93%)
Mutual labels:  starter, yeoman-generator
React Redux Auth0 Kit
Minimal starter boilerplate project with CRA, React, Redux, React Router and Auth0 authentication
Stars: ✭ 115 (-16.06%)
Mutual labels:  create-react-app, boilerplate
Nodejs Starter
Nodejs Starter - Open-Source Javascript Boilerplate | AppSeed
Stars: ✭ 86 (-37.23%)
Mutual labels:  starter, boilerplate
Cra Boilerplate
Up to date: This project is an Create React App - v2.1.1 boilerplate with integration of Redux, React Router, Redux thunk & Reactstrap(Bootstrap v4)
Stars: ✭ 87 (-36.5%)
Mutual labels:  create-react-app, boilerplate
Flask Full
starter/boilerplate flask application with celery, mongoengine, signals, shell commands, swagger api docs and sphinx docs integration
Stars: ✭ 117 (-14.6%)
Mutual labels:  starter, boilerplate
Create Elm App
πŸƒ Create Elm apps with zero configuration
Stars: ✭ 1,650 (+1104.38%)
Mutual labels:  boilerplate, scaffolding

Generator create-redux-app

NPM

This generator add redux, emotion-js and other useful libraries and tools like react-router, in top of the most common React starter Create React App. Below you will find some information on how to perform common tasks.

Installation

First, install Yeoman and generator-create-redux-app using npm ( You’ll need to have Node >= 6.10.3 on your machine node.js).

npm install -g yo
npm install -g generator-create-redux-app

Then generate your new project:

mkdir project-name
cd project-name
yo create-redux-app

Once the installation is done, you can run some commands inside the project folder:

npm start or yarn start

Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will see the build errors and lint warnings in the console.

npm test or yarn test

Runs the test watcher in an interactive mode.
By default, runs tests related to files changes since the last commit.

Read more about testing.

npm run build or yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

User Guide

Folder Structure

create-redux-app override create-redux-app folder structure. Once the generator runs your project folders should look like this:

my-app/
  docs/
  public/
    index.html
    favicon.ico
  src/
    actions/
    assets/
    components/
    constants/
    containers/
    reducers/
    routes/
    store/
    tests/
    styles/
    utils/
    index.js

For the project to build, these files must exist with exact filenames:

  • public/index.html is the page template;
  • src/index.js is the JavaScript entry point.

You can delete or rename the other files.

You may create subdirectories inside src. For faster rebuilds, only files inside src are processed by Webpack.
You need to put any JS and CSS files inside src, or Webpack won’t see them.

Only files inside public can be used from public/index.html.
Read instructions below for using assets from JavaScript and HTML.

You can, however, create more top-level directories.
They will not be included in the production build so you can use them for things like documentation.

Redux Dev Tools

Create Redux App use Redux DevTools Extension. It provides access to the most popular monitors, is easy to configure and to filter actions.

Installation

1. For Chrome

2. For Firefox

3. For Electron

4. For other browsers and non-browser environment

Git Hooks

We use Husky to create Git Hooks. There is a pre commit hook than run prettier to ensure good code format. You can also create a prepush hook.

// Edit package.json

"husky": {
  "hooks": {
    "pre-commit": "pretty-quick --staged"
  }
},

Uninstall

npm uninstall husky --save-dev

And delete the husky key inpackage.json

Prettier

You can add/remove rules if you want, just edit the .prettierrc file. Prettier runs in a precommit hooks to ensure good code formating with pretty-quick.

// Edit package.json

"scripts": {
  "format": "prettier --write '**/*.{js,jsx,json,md}'",
  "format:changed": "pretty-quick",
  "format:staged": "pretty-quick --staged",
  "eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check"
},
"husky": {
  "hooks": {
    "pre-commit": "pretty-quick --staged"
  }
},

Uninstall

npm uninstall eslint-config-prettier pretty-quick prettier --save-dev

Delete

"scripts": {
  "format": "prettier --write '**/*.{js,jsx,json,md}'",
  "format:changed": "pretty-quick",
  "format:staged": "pretty-quick --staged",
  "eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check",
},
"husky": {
  "hooks": {
    "pre-commit": "pretty-quick --staged"
  }
},

ESLint

You can add/remove rules or even extend plugins if you want. We extend airbnb ESLint rules.

// Edit eslintrc.json

{
  "extends": ["airbnb", "prettier", "prettier/react"],
  "plugins": ["prettier"],
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 2016,
    "sourceType": "module"
  },
  "env": {
    "es6": true,
    "jest": true,
    "browser": true,
    "node": true
  },
  "globals": {
    "DEBUG": false
  },
  "rules": {
    "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
    "import/no-extraneous-dependencies": 0,
    "import/no-unresolved": 0,
    "import/extensions": 0,
    "import/prefer-default-export": 0,
    "import/first": 0
  }
}

Routing

The best option for routing is React Router specifically its new version for the web react-router-dom.
src/routes/index.js is the starter point of the app, where all the routes are specified and render the containers and components. Specify here all your routes, redirects, transitions, etc.

Emotion Js

emotion-js allow you to write actual CSS code in your JavaScript to style your components, removing the mapping between components and styles.

See the official documentation for more information!

Adding Sass Preprocessor

Can I use Sass with this boilerplate? yes, although we advise against it and do not support this. We selected styled-components over Sass because its approach is more powerful: instead of trying to give a styling language programmatic abilities, it pulls logic and configuration out into JS where we believe those features belong.

If you really still want (or need) to use Sass then...

Redux Store

The Redux store is created this way so you can use it anywhere, even outside redux, in any js file.

const { default: store } = process.env.NODE_ENV === 'production'
  ? require('./storeProd')
  : require('./storeDev')

module.exports = store()

Usage

import store from './store'

store.getState() // Get the state
store.dispatch() // Dispatch actions

Create React App config

You can find the most recent version of the create-react-app guide here.

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].