React & React Native

Folder structure in React projects

Në shqip: Organizimi i dosjeve në React

ShpjegimiSQ

S'ka rregull të vetëm, por një strukturë e zakonshme: src/components (komponentë të ripërdorshëm), src/features ose src/pages (sipas faqeve/veçorive), src/hooks, src/lib. Për projekte të mëdha, grupimi sipas veçorive funksionon më mirë.

EnglishEN

There's no single rule, but a common structure is: src/components (reusable components), src/features or src/pages (by page/feature), src/hooks, src/lib. For big projects, grouping by feature works better.

Si ta mendosh

Si dollapi i kuzhinës: enët në një vend, erëzat në tjetrin.

Lexoje në anglisht

Like a kitchen cupboard: dishes in one place, spices in another.

Shembull koditext

src/
  components/   Butoni.tsx, Karta.tsx
  features/     kerkimi/, kartat/
  hooks/        useDebounce.ts

Terma të lidhur