Skip to content

chrisonside/would-you-rather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a React and Redux app where a user can play the 'Would you rather game'. It was built as part of my coursework for Udacity's React Developer NanoDegree course.

This project has been bootstrapped with Create React App.

This app uses a data file to represent a fake database, and this data file has methods to allow access to the data.

Users of the app can answer 'would you rather' questions, pose their own questions, toggle between polls they have and haven't answered, compare their answers to other users, and see how they are ranked on the leaderboard of users who have asked/answered the most polls. There is also a very basic login type functionality where the user just needs to select their name from a dropdown upon logging in.

I've added some simple styling to the app using SASS. I also use a few images/icons, from the Noun Project, PlaceKitten, PlaceBear and FillMurray.

To get the project up and running

  • git clone https://github.com/chrisonside/would-you-rather.git
  • cd would-you-rather
  • npm install
  • npm start

Overview of other dependencies (aside from React and Redux)

react-loader-spinner

The React Loader Spinner is used as a visual cue to the user that data will soon be loaded into the view.

react-router-dom

React Router DOM is used as the DOM bindings for React Router - React Router is a commonly used routing library for React and makes sure that my app's UI is in sync with the current URL.

redux-form

I am using Redux Form (which works well with the React-Redux bindings) to manage my form state in Redux.

redux-thunk

Redux Thunk middleware is used to release Redux from its synchronous confines, allowing my app to dispatch actions once it has heard back from an API.

node-sass

I followed this guide to using SASS in CRA, and this recommends to use the node-sass library to natively compile .scss files to CSS.

Future styling work

If adding/updating styles to this app in the future, to watch the SASS files and update the index.css file that the index.js points to, simply run npm run sass.

Finally, to avoid having to remember to transpile CSS before running a new build, a sass:build task has been added to the npm run build script, which will run a one-time build of the styles automatically.

About

A 'would you rather' app, built with React and Redux as part of the Udacity React NanoDegree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published