Skip to content

My reference starting configuration for a React Native app.

License

Notifications You must be signed in to change notification settings

daveham/MyTestApp

Repository files navigation

My Common React Native Start

This repo captures a common configuration of libraries I use in React Native applications.

This project was first bootstrapped using @react-native-community/cli. Then, the following libraries were added:

  • React Native Paper - Material Design UI
  • Redux and React Redux - I prefer old-school, without redux toolkit
  • Redux Actions - An opinionated approach based on Flux Standard Actions
  • Redux Sagas - Some say it is too complicated, but it's my choice for redux side effects
  • React Navigation - I've used multiple versions of this library for routing and navigation
  • Reactotron - In the ever-changing story of debugging react native applications, this is the one that currently works

Notes

The argument against Redux Sagas

This blog entry links to slides and a talk given by Mark Erikson (acemarke) who recommends using Redux Toolkit and avoiding Redux Sagas. Mark is a Redux maintainer and created Redux Toolkit so I pay attention to his advice. However, based on my experience and preference for the "mental model" of Redux Sagas, I accept the additional complexity for what I consider an elegant approach to orchestrating Redux side effects. I also choose not to use Redux Toolkit primarily because I embrace the principle of immutability at the heart of Redux and I prefer not to bury it under a layer of convenience.

Debugging

This article on Medium, Why you don't need Flipper in your React Native app..., explains what doesn't work anymore and hints that better debugger options are in development.