Coder Social home page Coder Social logo

artemgovorov / reactful-dice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from philipmw/reactful-dice

0.0 2.0 0.0 9 KB

Roll snake-eyes to win! This is a simple single-page application that demos React.

License: MIT License

JavaScript 6.95% TypeScript 80.57% HTML 12.48%

reactful-dice's Introduction

Philip's Reactful dice

This is a rudimentary Single-Page Application (SPA) that lets you roll dice. To make it a bit more fun, you get a dynamically-generated objective to get Snake Eyes with N dice in M rolls or fewer.

Try it online: http://philipmw-reactful-dice.s3-website-us-west-2.amazonaws.com

Why does this exist?

It's my toy project to explore React, and in particular, asynchronous updates to app state. My dice don't acquire a new value immediately, but some time after you initiate the roll. This is effectively the pattern webapps follow when requesting data from another endpoint, then wanting to render it once the value returns. (I don't make API calls here; I just schedule a callback.)

This webapp is based on my SPA template. It tries to follow good practices, such as having unit tests and using TypeScript.

Develop it

$ npm start

This supports hot reloading.

Run unit tests and linter:

$ npm test

Build and publish to the Internet

$ npm run build

Then upload the contents of web/ to your web host.

Improve it

I welcome pull requests, but it is important to me to keep this app SIMPLE. It demonstrates pure React, without Redux or other commonly-used libraries.

reactful-dice's People

Contributors

philipmw avatar

Watchers

James Cloos avatar Artem Govorov 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.