yaofur / stepper-form-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stepper-Form-Example

before all

  1. npm install
  2. npm run start or npm start
  3. run test npm run test or 'npm t'

Overview

oct-15-2018 22-48-46

TypeScript + React + Formik


build tools

ParcelJS

State Manager

It's basicly a form component, so I use formik to manager it's state. Also use yup to do form validation. And the step state is manager by formik's status.

In real world application, I may choose rematch or Redux as state manager.

CSS Solution

Styled-Components

There's a lot of CSS solution out there, it's hard to tell which one is better. Personal I prefer CSS-Module or StyledComponents or styled-jsx(only when using next.js).

Test

Use jest and enzyme for test, __tests__/app.tsx, only write some basic test for the app flow.

About


Languages

Language:TypeScript 91.5%Language:HTML 4.8%Language:JavaScript 3.7%