We use a feature-based approach in our project so we keep all files related to a specific feature close to each other
-
/components -
global reusable components in a whole app
-
/features -
ready to use application features that work independently from each other
-
/screens -
screens of the application (same as views in a web)
-
/controllers -
api connection functions
-
/types -
global typescript types
-
/utils -
helper functions that are reusable in a whole app
-
/hooks -
global custom hooks reusable in a whole app
! All tests, styling files, feature-specific hooks, utils, etc. should be stored directly in the feature itself !
File style.ts contains all the global styling that is being used in the app (flex, grid, variables, etc.)
You should declare all reusable stylings there
If you are new to react-hook-form library then we recommend you create your form along with documentation: https://react-hook-form.com/get-started
- create file in
/public/locales/pl
and every other language folder - import it to the typescript declaration file and add it to the resources as shown below -
/src/types/i18next.d.ts
:
Import { t } from 'i18-next';
const { t } = useTranslation('common');
, wherecommon
is the name of the file from which we want to get a translation (namespace)- use translated text in the app -
t('Hello', {ns: 'common'})
- whereHello
is the translated text and common is the name of the file (if we have imported only one namepsace then it can be skipped)
- Clone repository
git clone https://github.com/grupadotnet/pimi-connect-app.git
- Make sure u have yarn installed (or even node)
To install node: https://nodejs.org/en/download
To install yarn (in any terminal):
npm install -G yarn
- Install required dependencies
In a project main directory:
yarn
- start app
yarn start