It is a single screen app where you can enter an email to subscribe to a newsletter. If you enter a valid email, you have a success message but if your email is badly formatted, you'll receive an error message. For simplicity's sake, the api used does not really subscribe you to any newsletter, it only checks whether the email given is valid or not.
This project contains two different versions of the same app :
- a basic version: using nothing but internal state and basic components
- a complex version: using formik, redux and sagas
To switch versions, go to the index and use the App component corresponding to the version you want to use
Clone the repo and then, at its root, run
yarn
or
npm i
Then open up a simulator or connect a real device and run at the root of the project:
cd ios
pod install
cd ..
react-native run-ios
Then open up a simulator or connect a real device and run at the root of the project:
react-native run-android
Go to this file and follow this article
Just run yarn jest
. You can add --coverage
to find out how much code the tests cover