Giter Site home page Giter Site logo

resmith / udacity-reactnative_proj_mobile-flashcards Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 704 KB

Udacity final project for React native. Project is to create a decks containing quizes. The user can then test themselves. In addition, they can schedule notifications reminding them to study. Utilizes React Native, expo, Redux, Async Storage and Notifications.

JavaScript 100.00%
navigation props flatlist genymotion redux expo asyncstorage

udacity-reactnative_proj_mobile-flashcards's Introduction

Udacity React Final Project

for React Native

Mobile FlashCards

Install / Run Process

You'll need a mobile emulator. For Android, that's either Android Studio or GenyMotion. I've used both and prefer GenyMotion, but it's about $150/year for a personal license.

From a command line terminal

1. git clone <this repo>
2. cd to the directory the app is in
3. npm install
4. npm start

Technology Used

React Redux [See this code example for model used] (https://codesandbox.io/s/todo-app-with-redux-forked-myztr) React Navigation Safe Area View - as recommended by React Navigation Redux and Async Logic

Directory Structure

/src - contains all the app code

/src/components - contains reusable components. CustomButton, Cards, ...

/src/features - organizes the pages by features, which are: decks, cards, quiz and notifications

/src/redux - contains all state management. Within this it's further divided into decks (src/redux/decks) and notifications (src/redux/notifications)

  • Othermiddleware used is Thunk /src/utils - the data primarily. Also includes the API for Async storage and the expo calls for removal of notifications.

Redux

The primary redux stores/actions/reducers are:

  • decks: The list of decks including the cards. The object has an "allIds" and a "byIds". The "allIds" contains an array of the deck ids. The "byIds" contains the full object details.
  • notifications: list of the notfications

The quiz execution is updated in the deck object properties.

AsyncStorage

This application in addition to using state uses Async storage. At application startup (in App.js) the decks and the notifications are loaded. The quiz statuses are not in Async storage.

Platforms Tested

This application has been tested for Android with GenyMotion

Updates

Converted CardAdd to a functional component

The application

Home - DeckList

View Deck

Add Card

Quiz

Notes

Sometimes with this code, there may have been an easier way, but the intent of this project was to utilize a broad range of coding in react native. For instance, the notifications state could have mimicked the decks state with it's allIds & byIds. That would have been the easy way. It was decided to utilize a different but legitimate method for a greater understanding.

To reset the async storage, go to App.js and uncomment: // store.dispatch(removeDecks); // Used to initialize storage // store.dispatch(removeAllNotifications); // Used to initialize storage

After opening the app and letting it run, then comment it again

udacity-reactnative_proj_mobile-flashcards's People

Contributors

resmith avatar

Watchers

 avatar  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.