メインコンテンツへスキップ
Header

便利なコマンド

アプリの開始

npx nx start twenty-front

APIのGraphQLスキーマに基づいてGraphQLスキーマを再生成する

npx nx run twenty-front:graphql:generate --configuration=metadata
または
npx nx run twenty-front:graphql:generate

リント

npx nx run twenty-front:lint # pass --fix to fix lint errors

翻訳

npx nx run twenty-front:lingui:extract
npx nx run twenty-front:lingui:compile

テスト

npx nx run twenty-front:test # run jest tests
npx nx run twenty-front:storybook:serve:dev # run storybook
npx nx run twenty-front:storybook:test # run tests # (needs yarn storybook:serve:dev to be running)
npx nx run twenty-front:storybook:coverage # (needs yarn storybook:serve:dev to be running)

技術スタック

プロジェクトは、最小限のボイラープレートコードを持つシンプルでクリーンなスタックを持っています。 アプリ テスト ツール

アーキテクチャ

ルーティング

React Routerはルーティングを処理します。 不要な再レンダリングを避けるために、すべてのルーティングロジックはPageChangeEffect内のuseEffectにあります。

状態管理

Recoilは状態管理を処理します。 状態管理に関する詳細な情報はベストプラクティスを参照してください。

テスト

Jestはユニットテストのツールであり、Storybookはコンポーネントテスト用です。 Jestは主にユーティリティ関数のテスト用で、コンポーネントのテスト自体ではありません。 Storybookは、独立したコンポーネントの挙動をテストし、デザインシステムを表示するためのものです。