Gen Life Shuffle App
The main features of the app:
- The 3 images' order is shuffled randomly (using the Fisher-Yates algorithm) each time the button "Shuffle" is pressed.
- 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
-
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.
-
Clone Repository
$ git clone https://github.com/medied/gen-life-shuffle-app.git $ cd gen-life-shuffle-app
-
Install Dependencies
if you have npm installed, type:
$ npm install
if you only have meteor, type:
$ meteor npm install
-
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 π .