Quiz app for true and false questions. Main functionalities:
- Iteractive true or false questions
- Random questions fetched from the API
- Random images fetched from unsplash
- Results screen showing how many you got right
- Clone the project:
$ git clone https://github.com/jordanboaz/trivia_game.git
- Install dependencies:
$ yarn install
- If ios, install cocoa pods dependencies:
$ cd ios && pod install
- Execute
$ yarn ios
OR
$ yarn android
- The API opentdb was used to fetch random questions.
- The unsplash API was used to fetch random beuatiful images.
- Expo was used to facilitate the deliver of the app. Expo is an optional library frequently used on the react native enviroment to deliver fast app without a large setup.
- O React Native foi utilizado em sua versão 0.63.0. This is the version that runs on expo SDK 39.
- The app is build using Typescript, it grants bring static typing for javascript, granting us the ability to use the intelisense for our code editor, facilitates the refactoring of code, saves us debuging time and brings more assertiveness when accessing properties of our variables.
- Interfaces were created with payload responsed from the API, so the whole application is aware of it's data structure.
- axios for api access.
- reduxjs toolkit for simple state management of the application.
- react-native-svg to import SVGs into the app.
- react navigation v5 to allow us to navigate between screens.
- styled-components to simplify separation between code and stylesheets.
To ensure the code follow the some pattern and is correctly typed, some libs were used:
UI components, like buttons, lists were created to avoid code duplication. The components were create to be completely reusable and they do not contain any business logic.
- A service layer was created and acts as bridge between layers.
- The redux connects the outworld, the API and our visual layers.