Salt la conținutul principal
Header

Comenzi utile

Pornirea aplicației

npx nx start twenty-front

Regenerate graphql schema based on API graphql schema

npx nx run twenty-front:graphql:generate --configuration=metadata
SAU
npx nx run twenty-front:graphql:generate

Lint

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

Traduceri

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

Test

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)

Tehnologii Utilizate

The project has a clean and simple stack, with minimal boilerplate code. Aplicație Testare Instrumente

Arhitectură

Rutare

React Router se ocupă de rutare. Pentru a evita re-redări inutile, toată logica de rutare se află în useEffect în PageChangeEffect.

Managementul stării

Recoil se ocupă de managementul stării. Consultați cele mai bune practici pentru mai multe informații despre managementul stării.

Testare

Jest servește ca instrument pentru testarea unităților, în timp ce Storybook este pentru testarea componentelor. Jest este utilizat în principal pentru testarea funcțiilor utilitare, nu a componentelor în sine. Storybook este pentru testarea comportamentului componentelor izolate, precum și pentru afișarea sistemului de design.