タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

codeとreactとfrontendに関するslay-tのブックマーク (2)

  • React code conventions and best practices

    Use linting and automatic formatterAll the major tools for React provide linting rules. If you like, feel free to edit them to fit your style, but always use some and automate the process of linting and formatting. Preferred tools are eslint and prettier. Import orderAdd some import order rules to your eslint config. This will ensure that the imports are always in the same order and are grouped by

    React code conventions and best practices
  • Reactアハ体験 - Qiita

    Ryan Florence氏のReact Rally talkはこの原則をより深くカバーしているのでオススメです。 2つのコンポーネントがstateを共有したい場合、stateを同期させるのではなくstateを持ち上げる必要があります。 コンポーネントベースのアーキテクチャでは、stateの共有は自ずと困難になります。2つのコンポーネントが同じstateに依存する場合、そのstateはどこにあるべきでしょうか?これは最終的にReduxで決着した解決策のエコシステム全体を活性化するような人気のある質問でした。Reduxの解決策は「store」と呼ばれる別の場所にstateを集約することです。コンポーネントはstoreを必要な部分だけ購読でき、storeを更新するための「actions」をdispatchすることもできます。Reactの解決策は2つのコンポーネントの最も近い親を探し、そこで共有

    Reactアハ体験 - Qiita
  • 1