Skip to content

Comments

React Native Cash Register problem solution for Tony Perriello#58

Open
tonype wants to merge 4 commits intoSoftWriters:masterfrom
tonype:master
Open

React Native Cash Register problem solution for Tony Perriello#58
tonype wants to merge 4 commits intoSoftWriters:masterfrom
tonype:master

Conversation

@tonype
Copy link

@tonype tonype commented Dec 6, 2020

Hey all! Here is my solution for the Cash Register problem, written for iOS/Android in React Native.

ios
android

Pretty much all of the top level files are generated and can be ignored. The bulk of the code I wrote is in:

  • src/enums
  • src/screens
  • src/utils

If you'd like to run this on a physical Android device, I have an .apk on hand if needed. You can also pull these changes down and run the app on either an iOS/Android device by doing the following:

  • Install the Expo CLI: npm install --global expo-cli
  • Install the Expo client app on the device you'd like to use.
  • Pull down these changes, cd to the directory where they exist, and do an npm install in the root directory.
  • Run npm start or expo start to start up the Metro bundler server.
  • Once the Metro bundler server is running, it should have opened up a new browser tab on your machine. Both in there and in the terminal, there should be a QR code. From inside the Expo client app on your device, tap 'Scan QR code' and scan the QR code.
  • That should be it! The Expo client app will load up the Cash Register app, and you can start using it.

There are unit tests written in Jest for the Cash Register utility and the helpers utility files. You can do npm run test to run the suite.

This was a lot of fun! Thanks for your time and consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant