Dynamic landing screen for a content app using React Native.
- Android APK v0.1
- iOS .app v0.1
(Install with
xcrun simctl install <SIMULATOR_UID> <path/to/OneLandingScreen.app>
after extracting)
Android | iOS |
---|---|
![]() |
![]() |
yarn rn start
will start the usual RN server for serving files in the debug mode.yarn storybook
serves the storybook mode, with all components shown independently in the storybook. Helpful for manual testing and independently operating on components.yarn android
/yarn ios
for building and installing a debug build to an attached device/simulator.yarn test
for runningJest
tests.yarn lint
for running lint tests.- The dev setup is dependent on the environment config file(.env) that contains configuration keys
(
API_HOST
) that the app needs. (Please get in touch with me for getting env secrets). Sample env file here.
- The app consists of the following features in the first version
- The landing screen
- Shows an upcoming event with a countdown.
- Shows a feed.
- The code is structured in way that all code in the
components
directory is independent and reusable. - Follows the
ducks
file structure forstate
to aid this.actions
,reducers
andselectors
for one redux store slice in the same file. - Uses
createSlice
method fromredux-starter-kit
to specifyactions
,iniialState
, andreducers
all together in a verbose fashion for a store slice. - I assumed a placeholder logic for the
upcoming
,nearing
andlive
banner image states of an upcoming event, for lack of details on those.
- The upcoming event API has CDN asset links with
HTTP
and notHTTPS
. Not only is this generally insecure and not recommended, Cleartext HTTP traffic is not permitted after Android 8 (ref). Spend substantial time scratching my head debugging this and then had to add this as a workaround.
Would have done the following in the next iteration -
- Abstract out color literals and common styles to a Color Palette or styling lib.
- Integration tests for state management. In the current state and for a small/volatile app in general, unit tests for reducers would not be of much help. Integration tests would have a higher reward to effort.
- A UI test for the
Countdown
component. -
EventCard
andEventCardMinimised
potentially have some common code that can be refactored out.