Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lessons learned: Architecting react apps

Lessons learned: Architecting react apps

Ankita Kulkarni

September 15, 2020
Tweet

More Decks by Ankita Kulkarni

Other Decks in Technology

Transcript

  1. @kulkarniankita9 Use cases • Monitor your credit score - using

    biometrics • Food delivery app • Reporting
  2. @kulkarniankita9 Directory structure index.js src auth index.js actions/epic/reducer/selector common components

    button primaryButton/secondaryButton/tertiaryButton utils constants store storybook locale Modules
  3. @kulkarniankita9 Challenges • A lot of shared context made it

    difficult to share code Vertical slicing modules eg: auth, biometrics
  4. @kulkarniankita9 Challenges • Context was used as a state management

    solution When the app was small, this worked fine but not when it grew Look into a state management solution
 Examples: Redux, Apollo cache
  5. @kulkarniankita9 Challenges • We were missing data transformation using Apollo

    hooks Added validation on top of this to check for null values
  6. @kulkarniankita9 Docs! • Add a task to add some documentation

    to every Jira ticket • Practice what you preach
  7. @kulkarniankita9 Testing • Unit testing • React component testing: react-testing-library

    • API data transformation layer testing • Integration testing • Automation testing