yarn
cd ios
bundle install (if no cocoapods)
pod install
yarn ios
yarn android
if some errors with paths in Android, should:
yarn start --reset-cache
cd android
./gradlew clean
yarn android
yarn test
I've chosen to use feature-sliced design approach because it's
- well documented architectural approach with rules and conventions on organizing code.
- I have successfully used the modified approach in several projects. It also helps to separate into modules (in future it can be lerna and packages shared with web)
app
- for initializing application logic
entitites
- business entities, for building the business logic of the application; reused between different features
features
- one feature is a part of the business logic
screens
- contain navigation setup, render different features and layout elements
shared
- UIKIT (shared/ui), functions and methods working with API, app configs, common hooks, common utils, lib services
I've chosen to use redux-toolkit state management because
- simple logic with fetching data
- Less code, has convenient wrappers
- Good for mocking and testing
- You might consider using RTK-hooks and autogeneration of hooks with project expansion
I've chosen to use react-native-track-player for auto player
- Customizable and scalable
- Media Controls support
- works for both android & ios
I've chosen React Native Styled Components for styles
- It's really good for building themes and dark mode (I used styled-components in all my previous projects)
- cleaner JSX code
- Extendable components, very good for building design-system
I've added react-native-fast-image for caching cover image and optimization
I've added react-native-svg for 2 icons play and pause button
I've added @react-native-community/slider for slider
I've added axios for queries (also universal and expandable thing)
Didn't have time to write the tests but primarily covered business logic using jest (reducers, utils with formatinng date), then hooks and components using
React Native Testing Hooks Library
Now when entering a new track screen the jump stops. The description does not say about it, so I thought it is the simplest and best option.
Another option is to stay when the user clicked on another track play button