GithubHelp home page GithubHelp logo

i_love_tommy's Introduction

react-boilerplate

Available Scripts

# install module // 最初だけやるやつ、package.jsonを元にnode_modulesを作る
$ yarn install

# build app // デプロイする時用のやつをビルドする、多分やる事ない
$ yarn build

# start development server // ローカルサーバーがたつ
$ yarn dev

# run format by prettier // フォーマットが走る
$ yarn format

# run linter // linterが走る
$ yarn lint

overview

Role

global state: Context API // 多分無理だからReduxとか使えばいいと思うけど多分そもそも必要ない,
style: styled-components // css-loaderとか使えばいいと思うけど 「css-module vs css-in-js」とかで調べると良さそう,
routing: react-router // これはこれがいい,
type check: typescript // 初学者には酷なので殺した、jsxを書いて,

directory

src/
  index.html
  index.tsx
  components/ // コンポーネント分割やってもいいけどやらなくてもいい。 /pages以外使わなくていい。
    common/ 抽象化されており汎用性が高いもの // eg. Button, Margin
    layout/ レイアウトに用いられるもの // eg. Header, MainContainer
    pages/ ページ単位でのコンポーネント // eg. Login, Home
    parts/ 部品となるコンポーネント // eg. HogeForm, FugaList
    provider/ contextを流すプロバイダを定義 // eg. AccountProvider, ModalProvider
  lib/ // これはとりあえず使わないでいいと思う
    api/ 外部APIを叩く処理 // eg. login, getArticles
    contexts/ createContextで作ったContext // eg. AccountContext
    constants/ 汎用的に用いられる値群を定義
    hooks/ custom hooksを定義
    utils/ 汎用処理
    styles/ スタイル // eg. GlobalStyle, StyleVariable

public/
  images/ 画像

i_love_tommy's People

Contributors

setoken06 avatar

Watchers

James Cloos 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.