Using my previous repository template RN I am creating 2 components following a personal volunteer project about a Domestic Violence Reporting App:
Video Sample | Error Message Sample |
---|---|
The component is a reusable component in order to cover:
- First Name
- Last Name
- Report
- Password
- About me
- Therapist description
Features:
- Min and Max character
- Minimize props through dedicated enum
- Custom hook to fill datas
- Define text styles with styled-system and styled-components
- Extend TextInputProps
- Extend props to handle with hook the character lenght analysis
- Having fun with typescript props using pick propriety
- Strings for errors handles already in the component
- Accepting new styles from parent
- Error Accept
- Theme
WIP:
- Api connection
- 3 possibile card types Therapist | Report | Appointment
- Different Tag Lines,
- Icons and text.
- Collapsable text
- Theme
WIP:
- Api connection
- Abstract more the obj data to pass
- Abstract more the possible card types
For the Bottom Tabs Navigator:
- @react-navigation/bottom-tabs
For the Stack Navigator
- @react-navigation/stack
- react-native-gesture-handler
For the Navigation
- @react-navigation/native
To handle better the Safe Area (in particular better Android experience)
- react-native-safe-area-context
For enabling the SVG
- react-native-svg
- react-native-svg-transformer
- yarn add @types/react-redux
- yarn add react-redux
- yarn add redux-persist
- yarn add @react-native-async-storage/async-storage
- yarn add axios
CIRCULAR DEPENDENCIES Check if Redux is creating Circular Dependencies
- dpdm
yarn dpdm ./src/* --circular --exit-code circular:1 --warning=false
- Style your component with a custom theme app wrapper
- Style props for rapid UI development
- Rename the whole codebase just executing
npx react-native-rename "YOUR_PROJECT_NAME"
- Ensure your local machine is set up for React Native development. For up to date instructions on how to do this, visit the setup instructions on the official React Native documentation.
You need at least Xcode 13, this is to ensure you have access to iOS 15. You can download from here
You need to install at least android studio canary 5. You can download from here
-
Clone this repo to your local machine
-
Install
node_modules
by runningyarn
(you may need to install yarn globally first). -
Install pods by running
cd ./ios && pod install && cd ..
-
clean Android by running
cd android && ./gradlew clean && cd ..
- Run the android app with
yarn android
or the iOS app withyarn ios
. This will start the metro development server and run the app on a simulator.
For debugging iOS or Android specific bugs, it can be useful to run the app from XCode or Android Studio.
-
For XCode in the tab navigator (Product→ Build) or using the shortcut
⌘ + B
. -
For Android Studio - navigate to the React Native App from Android Studio and open the
./android
folder. Wait for the Gradle Sync to finish and then navigate to Run -> Run App.
For debugging, we use React Native Debugger. After this has been installed, open the debugger and run the app. You should see the JavaScript logs appear in the debugger console. You can execute and runs using the shortcut ⌘ + D
.