rishabhbhatia / react-native-nytimes-mostpopular

Simple NYTimes most popular articles master list detail app build with React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NYTimes Most Popular

The New York Times reader mobile app, made with React Native.

LandingScreenLoadingState

ArticleDetailsScreen

Features / Components

  • Uses React 16.8.3
  • Uses React Native 0.59.8
  • Displays most popular articles from NY Times

Development

Folder structure

Application is structured by features along with their unit test cases.

  • Articles have a listing page which contains each listing cell item component and it's unit test cases
  • Articles has it's detail page along with the test cases structured in a similar manner

Usage of frameworks

  • react-navigation-v3 which is extremely popular solution for navigating between screens
  • react-native-webview starting v0.60 of react native webview has been moved outside to react native community
  • react-native-vector-icons which simplifies using icons which a variety of icon collection
  • jest, enzyme and react-dom to facilitate unit testing

Getting started

Clone or download the repository, cd to the folder and follow the below steps

$ npm install 
$ react-native link
$ react-native run-ios
$ react-native run-android

Read more about linking libraries manually here Linking iOS

Scripts

  • $ npm start - Starts the react native package manager
  • $ npm test - Executes tests and prepares code coverage report
  • $ npm run lint - Lints the code using ESLint with the popular airbnb config

Testing

The project currently contains unit-tests for the components, at same path with name suffixed .test.js.

Run npm test to execute these tests. This will generate a coverage report under coverage folder. To view this report open coverage -> lcov-report and click on index.html.

Unit Test Coverage Report

Coverage

Coverage Report

Author

About

Simple NYTimes most popular articles master list detail app build with React Native


Languages

Language:JavaScript 73.2%Language:Objective-C 14.0%Language:Python 7.0%Language:Java 5.8%