Skip to content

fervailanti/RNRedditApp

Repository files navigation

React Native Reddit App

React Native Reddit listing demo app 🚀

Builded with: TypeScript, React Native, Axios, Testing Library and Reddit API.

Grabacion.de.pantalla.2022-02-24.a.las.0.52.54.mov

Setting Up

Android

  1. Create a file called local.properties at RNRedditApp/android/ with the following line:

For Windows users:

sdk.dir=C:\\Users\\UserName\\AppData\\Local\\Android\\sdk

Replace UserName with your pc user name . Also make sure the folder is sdk or Sdk.

For Mac users:

sdk.dir = /Users/USERNAME/Library/Android/sdk

Where USERNAME is your MacOS username.

For Linux (Ubuntu) users:

sdk.dir = /home/USERNAME/Android/Sdk

Where USERNAME is your linux username (Linux paths are case-sensitive: make sure the case of S in Sdk matches).

  1. Run yarn

  2. Run yarn start

  3. Run yarn android

iOS

  1. Run yarn

  2. Run cd ios && pod install && cd ..

  3. Run yarn start

  4. Run yarn ios

Available Scripts

In the project directory, you can run:

  • yarn android: Build and install de app in Android (debug mode).

  • yarn ios: Build and install de app in iOS (debug mode).

  • yarn start: Starts the metro bundler.

  • yarn test: Run jest tests.

Useful Information

  • Subreddit can be easily modified from src/utils/contants in SUBREDDIT constant. This will affect the whole app, including API calls and header title (default subreddit is r/pics).

  • The app is available for iOS >= 12 and Android API >= 21.

  • The project is using Prettier ESlint as default formatter.