The Art of ‘Humble Views’: Testing React Native Apps the Smart Way
summary
React Native code moves business logic into a small humble object module and UI state into a single useShoppingCart hook, shrinking a 110‑line screen to ~38 lines and turning brittle component tests into fast pure‑JS unit tests. Mocking collapses from many external services and native modules down to at most one mock (the hook), MVP passive views render deterministically, and E2E stays for integration while unit tests verify core rules like barcode checksum and discount calculations.
AI-written summary · about
chapters (7)
- 0:00Humble views in React Native
- 3:15Complex screen testing
- 8:54Separation of concerns in React
- 11:03Humble object model before/after
- 15:57Model View Presenter with code
- 19:49Pit of success in testing
- 21:13Recap and takeaways
related talks
53mTesting React Applications
25mReact developers in a wild world of native apps
24mThe Performance Myths of React Native apps
30mTesting & React Native"Lessons from the Battlefield"
22mCoding Session: React Native Practice
01h 01mReact Native: A Better Way to Do Mobile
25mGoing Native
27mBuilding high quality mobile apps with React Native
