Giter Site home page Giter Site logo

moya_for_desktop's Introduction

주제

내 책상 위의 애널리스트, MoYa for Desktop📈의 협업을 위한 레포지토리입니다.

실행방법

git clone https://github.com/Moya-news/boiler-plate.git foldername
cd flodername
npm run dev

개요

  1. 직관적인 설정 이해와 커스터마이징을 위해 CRA 없이 webpack,babel,react로 리액트 초기환경 설정을 하였습니다.

  2. prettier , eslint를 이용하여 코드 컨벤션을 설정하였습니다.

  3. redux, redux-saga를 위한 코드 패턴과 예시를 작성하였습니다.

  4. @redux-devtools/extension을 적용하였습니다.

    redux devtools크롬 익스텐션을 설치하여야 합니다.

    설치가 완료되면 개발자 도구를 통해 접근할 수 있습니다.

    image

폴더구조

├── node_modules
├── public
│   └── index.html
├── src
│   ├── index.js // 진입점
│   ├── GlobalStyle.js // reset.css
│   ├── components // 재사용 가능한 컴포넌트를 저장하는 폴더
│   │   └── example
│   │       ├── index.jsx // JSX를 반환하는 컴포넌트
│   │       └── style.js // css-in-js를 저장하는 폴더
│   ├── reducers // reducer를 저장하는 폴더
│   │   │── [reducername]
│   │   │    ├── actionType.js //액션 타입과 액션 생성함수는 actionType.js에서 관리
│   │   │    └── [reducername].js // reducer를 반환
│   │   └── rootReducer.js // root reducer를 반환
│   ├── sagas // saga를 저장하는 폴더
│   │   │── [saganame].js
│   │   └── rootSaga.js // root saga를 반환
│   └── store // store를 저장하는 폴더
│   │   └── store.js
│   └── util // 유틸 함수를 저장하는 폴더
└── ...

절대경로

총 4가지 절대경로를 설정하였습니다.

  • @components : src/components
  • @reducers: src/reducers
  • @sagas: src/sagas
  • @utils: src/utils

사용된 라이브러리

  • css-in-js를 작성하는데에 @emotion/styled를 이용합니다.
  • 상태관리에 reduxredux-saga를 이용합니다.
  • js로 작업할 때는 prop-types를 이용하여 component의 props타입을 지정합니다.

추가 예정인 항목들

  • cors 에러가 발생할 경우 webpack-dev-server의 설정을 통해 proxy를 사용할 수 있습니다.( 이 부분은 당장 적용할 수 있습니다. )

참조

Setup Webpack and Babel for React

Webpack 러닝 가이드

Webpack 공식문서

moya_for_desktop's People

Contributors

gyoheon 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.