Code Monkey home page Code Monkey logo

react_template's Introduction

redux saga : api 통신 사이에 끼워 추가 동작을 일으킬 수 있도록 도와주는 라이브러리

<전체적인 동작>

src/module/*module.js : 액션함수이름, 액션함수, 모듈단위 전역변수 초기값(한 페이지에서 요구하는 변수들), 모듈 단위 리듀서 생성

src/module/index.js : 모듈단위 리듀서 통합하여 export

src/api/*API.js : 실제 액션함수 호출하여 서버에서 데이터 요청. 중간에 redux saga를 통하여 요청 중의 변수 일으킴

src/api/index.js : saga 미들웨어를 덮은 모든 api 통합해서 export

src/module/configureStore.js : 리듀서, 미들웨어 등 통합해서 스토어로 저장 후 export

src/index.js : Provider 컴포넌트에 store props 전달하여 하위 모든 컴포넌트에서 store를 손 쉽게 받을 수 있도록 함

src/App.js OR src/componenets/*/index.js : mapStateToProps, mapDispatchToProps를 통하여 store의 상태값들과 액션함수들 return, connect 함수로 하위 CT에게 store의 상태값들과 액션함수들 전달

*CT.js : 각 페이지의 이벤트핸들러 및 변수 관리

*PT.js : 각 페이지의 View 담당

react_template's People

Contributors

withbbang avatar

Watchers

 avatar  avatar

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.