chengcyber / react-countdown-demo

count down demo, mimic phone validation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Count Down Demo

this demo is mimic a use case of phone number validation, user fills in the phone number, after checking the validation, a request will be send to back end, and a default 60 seconds prevent user to send request again before any response from back end.

Description

  1. free unmount remount via clicking switch
  2. fill in your phone number
  3. click SEND button
  4. wait 5 secs, receive a success feedback :)
  5. re-click SEND button with the same phone number
  6. another 5 secs, receive a warning about duplicate phone number usage

Try yourself

CLICK ME!

Run in local

git clone git@github.com:kimochg/react-countdown-demo.git
cd react-countdown-demo
yarn install
yarn start

normally, a browser window will open and visit localhost:3000/

Test

yarn test

press a to run all test

LINCENSE

MIT

About

count down demo, mimic phone validation

License:MIT License


Languages

Language:JavaScript 84.5%Language:CSS 8.5%Language:HTML 7.0%