SpaceToStudy React Native project is an Android app where experts in various fields share their knowledge, and students can learn from the best. You can find a proper training course, locate a tutor, or find students and receive feedback from them.
[]
[]
[]
- All the
coderequired to get started with the React Native version.
- Android Studio for mobile emulators (depending on the platform you're targeting)
- Clone this repo to your local machine
Install npm packages
$ npm install- Open terminal.
- Start the project with Expo by running:
$ npm start- Open Android Studio, launch an emulator or connect your physical device.
- Follow the Expo instructions to open the app on your emulator/device.
To run unit tests, open the terminal and execute:
$ npm test-
Redux
Each entity should have a separate folder. In each folder, different files are needed for actions and reducers:{modelName}.actions.js{modelName}.reducer.js
-
Configuration
Configuration is done via the.envfile where environment variables are located. -
Styles
For styling, useStyleSheet.create()fromreact-nativeand ensure styles are encapsulated within the specific component. -
Components
- Components connected to Redux should be located in the
containersfolder. - Components without a Redux connection should be in the
componentsfolder. - Pages accessible via routing (using
react-navigation) should be in thepagesfolder. All components used on a page should reside in that page's specific folder.
Each component should have at least two files:
index.jsmain file with all logic{component-name}.styles.jswhere styles are stored
- Components connected to Redux should be located in the
Order of testing:
- Stateless components used across multiple places.
- Components depending on other components but not connected to Redux and without state.
- Components with internal state but not connected to Redux.
- Components connected to Redux.
- Properties: default properties, custom properties, and data types (use
jest-extended). - Conditions: test behavior under different conditions.
- State: default state and how state changes based on events.
- Events: test events with and without parameters.
- Test snapshots to compare UI changes.
- Test the component's logic, especially dynamic behaviors.
- Third-party libraries
- Constants
- Static styles
You're encouraged to contribute to our React Native project if you've found any issues or missing functionality. You can add issues in the Issues tab and click New issue.
Before sending a pull request, discuss the changes using an existing issue or create a new one. All pull requests should be done in the develop branch.
- We have main, develop, and feature branches.
- All feature branches must be merged into
develop. - Only release branches should be merged into
main.
- Clone the repository or create a new branch from
develop. - Make commits to your branch.
- Create a pull request targeting
develop.
- Go to Issues and click
New issue. - Fill in the name, description, assign a person, and label the issue.
- If the issue is a
User Story, link it to corresponding tasks.
