GithubHelp home page GithubHelp logo

Comments (3)

Yuya-Furusawa avatar Yuya-Furusawa commented on July 28, 2024

大きいコンポーネントは分割しよう

大きいコーポーネントや大きい関数は可読性が下がる
メンテナンスがしにくい、他の人や未来の自分が読めなくなるなどのデメリット

基本的には「感覚で」大きいと思ったらコンポーネントを分けた方が良い
判断基準の一つ:2週間後の自分が読めるかどうか

コンポーネントを分割した場合、それぞれのコンポーネントを同一ファイルに記述するか、別のファイルに記述するか、のどちらかになる

別のファイルに記述するメリット
名前空間が別になる
別のファイルに記述するデメリット
めんどくさい、チェックしにくい(でも同じディレクトリならそのデメリットも小さい、巨大プロジェクトで遠くのディレクトリとかに入れるとしんどい)

でもそれは結局プロジェクト次第

from self-study.

Yuya-Furusawa avatar Yuya-Furusawa commented on July 28, 2024

PredictionGeeks開発の手順(React開発)

  • branch変更(branchで作業してmasterにPR、productionブランチは触らない)
    • branchの命名:[種類]/[front or back]/[内容]
    • 例:fix/frontend/character-size
  • yarn dev → これで保存すればlocalhost3000でリアルタイムに変更確認可能
    • package.jsonがあるディレクトリで実行する
  • 開発終了後、yarn lint yarn format yarn typecheckを叩いて、コードをチェック
  • git add git commit git push してPRを送る

from self-study.

Yuya-Furusawa avatar Yuya-Furusawa commented on July 28, 2024

Reactアプリ、フォルダ名・構成の変更

プロジェクトの名前変更

フォルダ名の変更+package.jsonnameを変更
参照:How can I change ReactJS Project (folder) name?

from self-study.

Related Issues (11)

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.