Skip to content

disrae/gooseinsurance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

Challenge Specifications

  1. Install Instructions
  2. File Structure
  3. Code Philosophy
  4. Import Pattern
  5. Demo
  6. Future Improvements
  7. Struggles and Mentions

1 Install Instructions:

  • npm i
  • For iOS:
    • cd ios && pod install && cd ..
    • npm run ios
  • For Android:
    • npm run android

2 File Structure:

image

3 Code Philosophy:

  • Less code is more readable and less opportunitiy for errors.
  • Provide names for any code that isn't easy to understand at a glance.
  • Balance co-location with code size:
    • Too much code is harder to read, but toggling between files is also a bad developer experience.
    • Optimally: have less and more dense code.
  • Keep imports clean by using index files.
  • Optimize for developer experience so:
    • Bugs are easier to track down.
    • Features are easier to write and integrate.
    • Code is easy to reason about and is easier to onboard.
  • Use consistent style so the code is easier to parse.

4 Import Pattern:

  • React imports
  • Navigation imports
  • Redux imports
  • Local imports

5 Demo 📽 Login credentials automatically inserted:

iOSDemo.mov
androidDemo.mov

6 Future Improvements:

  • Currently there are no tests, but a few tests to make sure that:

    • components mount
    • login endpoint works
    • navigation works on every screen

    would help ensure the core functionality is there after a code change.

  • As the app grows, I would separate the navigation index file into individual navigator files, they would then be exported as a single navigator in the index file.

  • Currently the app has only been tested on two device, an iPhone14 and an Android Pixel 3, ideally more testing would be done to check if the layout holds its shape well, and if the packages used work as expected on those devices.

7 👷🏼‍♂️ Struggles and Mentions 👷🏼‍♂️

  • The React Navigation documentation for type checking left me with type errors, I eventually followed this video to assign compatible types.

  • I had an issue where the marked Ruby version required doesn't exist for an M1 Apple chip, so I installed one semantic version higher. I get a warning.