All Projects → gkhan205 → Cwg React Starter

gkhan205 / Cwg React Starter

Licence: mit
Pre-configured and Ready to use React Starter App. To save time in settings things up for new project. Almost everything needed is already configured. Just clone and start developing without wasting time in doing same stuffs for every project. (#codewithghazi)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cwg React Starter

Soundcloud Redux
SoundCloud API client with React • Redux • Redux-Saga
Stars: ✭ 681 (+458.2%)
Mutual labels:  react-router, react-redux
React Antd Admin Template
一个基于React+Antd的后台管理模版,在线预览https://nlrx-wjc.github.io/react-antd-admin-template/
Stars: ✭ 1,022 (+737.7%)
Mutual labels:  react-router, react-redux
React Redux Boilerplate
A minimal React-Redux boilerplate with all the best practices
Stars: ✭ 799 (+554.92%)
Mutual labels:  react-redux, react-boilerplate
Antd Umi Sys
企业BI系统,数据可视化平台,主要技术:react、antd、umi、dva、es6、less等,与君共勉,互相学习,如果喜欢请start ⭐。
Stars: ✭ 503 (+312.3%)
Mutual labels:  react-router, react-redux
React Redux Hooks Starter
React-redux boilerplate using hooks 🎣
Stars: ✭ 69 (-43.44%)
Mutual labels:  react-redux, react-boilerplate
Xiaoduyu.com
🐟小度鱼 - 年轻人的交流社区 https://www.xiaoduyu.com
Stars: ✭ 549 (+350%)
Mutual labels:  react-router, react-redux
Create React App Redux
React Router, Redux, Redux Thunk & Create React App boilerplate
Stars: ✭ 885 (+625.41%)
Mutual labels:  react-router, react-redux
Quickbill
Create unlimited invoices for free.
Stars: ✭ 278 (+127.87%)
Mutual labels:  react-router, react-redux
Dva Starter
完美使用 dva react react-router,最好用的ssr脚手架,服务器渲染最佳实践
Stars: ✭ 60 (-50.82%)
Mutual labels:  react-router, react-redux
Simple Universal React Redux
The simplest possible Async Universal React & Redux Boilerplate app, that works on both Mac and Windows
Stars: ✭ 58 (-52.46%)
Mutual labels:  react-router, react-redux
Django React Boilerplate
DIY Django + React Boilerplate for starting your SaaS
Stars: ✭ 385 (+215.57%)
Mutual labels:  react-router, react-redux
React Demo Gather
react demo合集,有自己写的,也有在学习过程中觉得很好的demo收集的,持续更新中
Stars: ✭ 97 (-20.49%)
Mutual labels:  react-router, react-redux
2life
💌 双生:遇见另一半的美好:)(React Native)
Stars: ✭ 374 (+206.56%)
Mutual labels:  react-router, react-redux
Redux Webpack Es6 Boilerplate
A starter project for modern React apps with Redux
Stars: ✭ 566 (+363.93%)
Mutual labels:  react-router, react-boilerplate
React Antd
基于react + redux + immutable + less + ES6/7 + webpack2.0 + fetch + react-router + antd实现的SPA后台管理系统模板
Stars: ✭ 321 (+163.11%)
Mutual labels:  react-router, react-redux
Todo React Redux
Todo app with Create-React-App • React-Redux • Firebase • OAuth
Stars: ✭ 942 (+672.13%)
Mutual labels:  react-router, react-redux
Flag Project React
Awesome stack, awesome project pls press the star button
Stars: ✭ 278 (+127.87%)
Mutual labels:  react-router, react-redux
Tonzhon Music
将QQ音乐、网易云音乐和酷我音乐上的歌添加到一个列表来播放!
Stars: ✭ 257 (+110.66%)
Mutual labels:  react-router, react-redux
Egg React Typescript Boilerplate
Egg React TypeScript Server Side Render (SSR) / Client Side Render (CSR)
Stars: ✭ 56 (-54.1%)
Mutual labels:  react-router, react-redux
Dva React Worms
dva新手综合教程
Stars: ✭ 70 (-42.62%)
Mutual labels:  react-router, react-redux

GitHub license GitHub stars GitHub issues

CWG React Starter

Pre-configured and Ready to use React Starter App. To save time in settings things up for new project. Almost everything needed is already configured. Just clone and start developing without wasting time in doing same stuffs for every project

Read detailed explanation here

Overview

Things included in this starter app

  • Folder Structure
  • Axios Interceptor
  • Redux with Redux-Thunk
  • Router with Private Route
  • Confugured for SCSS/SASS
  • Eslint & Prettier
  • Pre-commit Hook
  • Absolute Imports

Please follow this import style for better code readability

Folder Structure

Big and extensive React application should have well planned and organized project structure. Best way is to use a mix of strategies to achieve better results as I am going to describe next.

Top level project architecture (which is under src/ folder) should be organized by type. No files should be here, just folders. This way it will be clear and understandable. Similar to a home where you have a foundation, walls, roof and etc. Under these walls are rooms, but may be you don't want to go there if you have some work outside like for instance painting walls. Having files in here adding mess. We should keep it clear like this:

- src/
  - main/
  - modules/
  - library/
  - resources/

Main Folder : This folder is for main configurations such as Redux Create Store, Axios Instance and Routes

- src/main/
  - axios/
    - index.js
  - routes
    - index.js
    - PrivateRoute.js
  - store/
    - index.js
    - mainReducer.ts

Modules Folder : This folder is for Modules/Features of our app, we can treat this as containers. Each module/feature will have all its related files in same folder. We may have some module related components which we will be placing inside frames folder and components which are used in more than one module we will keep in common/components to share across the application. Reason for keeping all related files in same folder to increase maintainability and searchability.

- src/modules/
  - Dashboard/
    - index.jsx
    - dashboardStyles.scss
    - dashboardActions.js
    - dashboardConstants.js
    - dashboardReducer.js
    - frames/
      - HeaderFrame/
        - index.jsx
        - headerFrameStyles.scss
      - CoolFrame/
        - inex.jsx
        - coolFrameStyles.scss

Library Folder : This folder will keep all our helpers and common files which will be shared across the application. We have 2 major folder in this common and utilities. If you want to create some api services you can keep it in api folder inside library folder.

- src/library/
  - common
    - components
      - Header
        - index.jsx
        - styles.scss
      - Dropdown
        - index.jsx
        - styles.scss
    - actions
      - AuthActions.js
    - constants
      - StoreConstant.js
      - ImagesConstants.js
      - URLConstants.js
    - reducers
      - AuthReducer.js
  - utilities
    - Validators.js
    - Storage.js
  - api - (optional folder as per requirement create this)
    - AuthApiService.js

Resources Folder : This folder will be used to keep all our static resources such as images, styles (mixins, variable etc), seeds, fonts etc. In current starter pack fonts and seed folder is not created, you can add them as per your need.

- src/resources/
  - images/
    - logo.svg
  - styles/
    - variables.scss
    - mixins.scss
  - fonts/
    - Roboto.ttf
  - seed/
    - country.json

Imports Style

Order should be as below

Imports from node_modules

Absolute Imports

Relative Imports

example:

import React from 'react';
import { uniqBy } from 'lodash';

import AppNavbar from 'library/common/components/AppNavbar';

import './style.scss';
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].