FabriceSalvaire / poc-portal-checkout-frontend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Donation Checkout Component

This repository implements a donation checkout component using the React framework (16.8 hooks) and Material-UI React components for Material Design.

screenshot

Stack

Features

  • plugable in a HTML page as a component
  • plugable in Wordpress as a shortcode block
  • implement WAI-ARIA for accessibility

reCAPTCHA Protection

Alternative Implementations

Discussion on the implementation

Actually popular frameworks are, sorted by trends:

  1. React backed by Facebook and the framework used by Wordpress
  2. Angular backed by Google and the successor of AngularJS
  3. Vue.js a popular framework created by Evan You, used by Alibaba
  • PReact a lightweight counterpart nearly compatible with the React API (4kB)
  • Riot a 7kB framework
  • Polymer

Issues

  • duplicated code to to enforce that at least one toggle button must be active

Running and Building the Application

Application is generated by the tool Create React App that uses Webpack internally. See package.json for settings and node_modules/react-scripts/config/webpack.config.js.

Note: eslint-plugin-react-hooks is included by default in Create React App.

  1. Install Node.js and Yarn package manager
  2. Install required packages in node_modules (it requires 425 MB of free space disk)
    yarn install
    
    or
    
    npm install
    
  3. Build and serve the application for development
    yarn start
    
    or
    
    npm start
    

Note: to customise the browser, uses e.g. BROWSER="google-chrome" yarn start

  1. Go to http://localtest.me:3000/checkout
  2. Build the application for production
    yarn build
    
    or
    
    npm run build
    

Storybook

Start Storybook using yarn storybook

Documentation using React Styleguidist

React Styleguidist

Start a style guide dev server using npx styleguidist server

About


Languages

Language:JavaScript 53.0%Language:Python 26.9%Language:Vue 15.2%Language:SCSS 3.0%Language:PHP 1.4%Language:HTML 0.3%Language:Emacs Lisp 0.1%Language:Shell 0.0%