Giter Club home page Giter Club logo

ts-pokedex's Introduction

Pokedex - React Native Project

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2023-11-17.at.17.01.19.1.mp4

Setup

This project is bootstrapped with npx create-expo-app -t expo-template-blank-typescript. For simplicity in testing, use the Expo Go client, but it can be modified to use EAS builds with development clients. The project uses the latest EXPO SDK, version 49.

Commands

  • Run npm install expo-cli --global
  • Run npm i inside the project folder
  • Check TypeScript: npm run ts:check
  • Check lint: npm run lint
  • Start in production mode: npm run start:production
  • Start in development mode: npm run start

Once Metro has started, press i to open the iOS simulator.

Notes:

There are many wrappers for the PokeAPI available (https://pokeapi.co/docs/v2#wrap), but to demonstrate my skills, I created my own API slice to interact with the PokeAPI. To save time, I used the type definitions available from 'pokenode-ts' to ensure type parity.

Navigation

This project uses the newest Expo Router (next-generation file-based navigation - https://docs.expo.dev/routing/introduction/). It can also be configured with the latest React Navigation (https://reactnavigation.org/) if preferred.

State Management

Redux with Redux Toolkit is used. This is the official Redux wrapper that simplifies most Redux tasks and eliminates a lot of boilerplate code (https://redux.js.org/introduction/why-rtk-is-redux-today).

Data Fetching

RTK Query is employed. Similar to React Query but made to work with Redux/RTK (https://redux-toolkit.js.org/rtk-query/overview). This provides both data fetching and caching.

Code Quality

  • eslint
  • eslint-plugin-react
  • eslint-plugin-react-native
  • eslint-plugin-react-hooks

Code Formatting

  • prettier

TODO & Improvements

  • Implement Styled Components/Emotion + Theming provider with Emotion.
  • Add NetworkProvider to monitor network state and display connection state warnings/errors.
  • Enhance error handling with Sentry Integration and performance profiling.
  • Integrate analytics and screen tracking (Customer.io/Amplitude/GA, etc.).
  • Develop Redux Slice tests and component tests.
  • Improve GitHub setup with husky pre-commit hooks, automatic linting, and test runs.

Extras

Redux with RTK toolkit was used because the latest Redux framework was a requirement for this assessment. However, I would be interested in completing this assessment using next-gen state management libraries like Recoil (by Facebook - https://recoiljs.org/), Jotai (https://jotai.org/), or Zustand (https://docs.pmnd.rs/zustand/getting-started/introduction).

ts-pokedex's People

Contributors

sergey-king 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.