Giter VIP home page Giter VIP logo

pokemon's Introduction

Getting Started

Note: After cloning the project, make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.

Step 1: Installing dependencies

# using npm
npm install

Step 2: Start the bundler

# Normal/ with-Staging APIs
npm run start
npm run start:stag

# Production APIs
npm run start:prod

For Android

npm run android

For iOS

npm run ios

Project details

  1. Since the styling wasn't mentioned in the task document, I've kept the styling to a minimum.
  2. As mentioned in the package.json, start:stag and start:prod scripts will pickup relevant env variables from .env.prod and .env.stag (default) files and use them. Its being used in api.ts file.
  3. Keeping .env files in the repo as well so you can use it (not added in gitIgnore)
  4. Theres no input in the app, so keeping the tests to a minimum as well (excluding typescript, to keep it clean). Currently I have written 2 tests for the Main and Details views. The tests mock the best case scenario, after the RTK query hook's positive response. Further tests can be written by changing the mock data responses of the hook queries for both views. e.g. before loading, error in response, while waiting for response and etc.
  5. use npm test
# For all files within the __test__ folder
npm test
# For individual files within the __test__ folder (npm test <filename>)

npm test Main.test
npm test Details.test
  1. For persistent storage, I used react-native-mmkv library which has encription support as well. It wasn't clear how the data was to be stored and used locally so I just added it to Main.tsx file in the useEffect for now. Its being hosted and exported from the file localstore.ts.

pokemon's People

Contributors

kinankazmi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.