medied / gen-life-shuffle-app

Simple shuffle app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gen Life Shuffle App

The main features of the app:

  1. The 3 images' order is shuffled randomly (using the Fisher-Yates algorithm) each time the button "Shuffle" is pressed.
  2. The link "Go to other page" takes you to the /other route and retains the order of the images.

This app uses React and Redux and was built with Meteor.

Setup

  1. Install Meteor

    On Linux & MacOS, load a terminal and type:

    $ curl https://install.meteor.com/ | sh

    This will setup Meteor (including Node and Mongo if necessary).

    Note: Windows users must download installer.

  2. Clone Repository

    $ git clone https://github.com/medied/gen-life-shuffle-app.git
    $ cd gen-life-shuffle-app
  3. Install Dependencies

    if you have npm installed, type:

    $ npm install

    if you only have meteor, type:

    $ meteor npm install
  4. Run App

    While in repository directory type:

    $ meteor

    Load browser and go to http://localhost:3000/ πŸŒ‘πŸŒ–πŸŒ•

Notes

  • I tried to keep the app as simple as possible. For example, I pass the store state object down from root component as a prop instead of using <Provider>.
  • App respects Redux' three fundamental principles. Store object holds the images order and it is the only source of truth. Image order is retained after routing because of this fact.
  • First time using Redux directly! Fun to learn and hack πŸ™‚ .

About

Simple shuffle app


Languages

Language:JavaScript 94.3%Language:CSS 3.2%Language:HTML 2.6%