Skip to content

Files

Latest commit

 

History

History

Counter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

7guis - Counter (ReactJS + Mocha)

Counter exercise

from the 7guis wiki

Challenges: understanding the basic ideas of a language/toolkit and the essential scaffolding

alt text

The task is to build a frame containing a label or read-only textfield T and a button B. Initially, the value in T is “0” and each click of B increases the value in T by one.

Counter serves as a gentle introduction to the basics of the language, paradigm and toolkit for one of the simplest GUI applications. Thus, by comparing Counter implementations one can clearly see what basic scaffolding is needed and how the very basic features work together to build a GUI application. A good solution will have very minimal scaffolding.

Install

Make sure you have node and npm installed, then run:

npm install

to install all dependencies.

Run

You can build the project:

npm run build

which will generate the dist/bundle.js file, or run the development server:

npm run serve

which will create a server listening on localhost port 8080

Tests

You can run tests once:

npm test

or watch for all js, jsx file changes:

npm test:watch