Coding test assessment for Loger Limited
To set up the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/KanmaChizea/Stockline.git
- Navigate to the project directory:
cd Stocklime
- Install dependencies:
npm install
oryarn install
Once installed, follow these steps to run the project:
To start Metro, run the following command from the root of the project:
# using npm
npm start
# OR using Yarn
yarn start
Let Metro Bundler run in its own terminal. Open a new terminal from the root of your React Native project. Run the following command to start your Android or iOS app:
# using npm
npm run android
# OR using Yarn
yarn android
# using npm
npm run ios
# OR using Yarn
yarn ios
In this project, I've adopted several coding practices to enhance maintainability and reusability:
-
Separation of Logic and UI: Each screen is associated with a view model, ensuring a clear separation of concerns between UI rendering and business logic.
-
Reusable Components: Created reusable components such as buttons, input fields, dropdowns, modals, and list tiles, facilitating consistent UI across the app.
-
Custom Hooks for Simplified Functionality: Implemented custom hooks to streamline certain functionalities, such as a form handling hook and a modal management hook. These hooks simplify complex operations and promote code reuse.
To run tests for the project, use the following command:
npm test