内容简介:A ready-to-use boilerplate for React JS with Redux and Saga.This is a basic project structure with repeatative use cases. Added some essential feature for every projects. It is very useful to build mid to complex level project. This project structure is ba
React JS with Redux and Saga Project Structure
A ready-to-use boilerplate for React JS with Redux and Saga.
Project Overview
This is a basic project structure with repeatative use cases. Added some essential feature for every projects. It is very useful to build mid to complex level project. This project structure is based on NodeJs api boilerplate app: https://github.com/maitraysuthar/rest-api-nodejs-mongodb
I had tried to maintain the code structure easy as any beginner can also adopt the flow and start building a great app. Project is open for suggestions, Bug reports and pull requests.
Is this project deserves a small treat?
If you consider my project as helpful stuff, You can appreciate me or my hard work and time spent to create this helpful structure with buying a coffee for me.
Features
| Feature | Details |
|---|---|
| Structure | Project is build with extenensible and flexible Moduler pattern |
| Authentication | Basic Authentication (Register/Login) |
| Confirm Account | Account confirmation with OTP verification |
| Route Protection | Route protection with middleware and localstorage |
| Lazy Loading | Added Lazy Loading of components to fasten the execution process of application |
| App State Management | Application level state management with Redux |
| Async Call | Managed async calls with Saga middleware |
| Forms | Managed apllication forms & validations with Formik and Yup |
Software Requirements
- Node.js 8+
How to install
Using Git (recommended)
- Clone the project from github. Change "myproject" to your project name.
git clone https://github.com/maitraysuthar/react-redux-saga-boilerplate.git ./myproject
Using manual download ZIP
- Download repository
- Uncompress to your desired directory
Install npm dependencies after installing (Git or manual download)
cd myproject npm install
Setting up environments
- You will find a file named
.env.exampleon root directory of project. - Create a new file by copying and pasting the file and then renaming it to just
.envcp .env.example .env
- The file
.envis already ignored, so you never commit your credentials. - Change the values of the file to your environment. Helpful comments added to
.env.examplefile to understand the constants.
How to run
npm start
New Module
All the modules of the project will be in /src/modules/ folder, If you need to add more modules to the project just create a new folder in the same folder.
Every folder contains following files:
index.jsx actions.js reducer.js saga.js [module].css
Root module:
Module's root module folder is /src/modules/app/ it contains main Routes file ( routes.js ) , Reducer file ( mainReducer.js ) and Saga file ( mainSaga.js ) . You will need to add your every component,reducer & saga to make your module work.
Found any bug? Need any feature?
Every project needs improvements, Feel free to report any bugs or improvements. Pull requests are always welcome.
License
This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Java语言程序设计(基础篇 原书第10版)
[美]粱勇(Y.Daniel Liang) / 戴开宇 / 机械工业出版社 / 2015-7 / 85.00元
《Java语言程序设计(基础篇 原书第10版)》是Java语言的经典教材,中文版分为基础篇和进阶篇,主要介绍程序设计基础、面向对象编程、GUI程序设计、数据结构和算法、高级Java程序设计等内容。本书以示例讲解解决问题的技巧,提供大量的程序清单,每章配有大量复习题和编程练习题,帮助读者掌握编程技术,并应用所学技术解决实际应用开发中遇到的问题。您手中的这本是其中的基础篇,主要介绍了基本程序设计、语法......一起来看看 《Java语言程序设计(基础篇 原书第10版)》 这本书的介绍吧!