/user-app

Simple app to register informations about users, with validation!

Primary LanguageJavaScript

User APP

Simple app to register informations about users, with validation!

Alt text

How to run the app

With yarn:

yarn install
yarn start

With npm:

npm install
npm start

Solution

  • I've used React as UI library and Redux as a state container, the store has
{
  users: {
    list: Array(users)
  }

}
  • Yup for schema validation

  • and to make the logic centralize I've made UserService.js that has below functions with testing

userService.getList()
userService.addUser()
userService.deleteUserById()
  • I've used comments for JSDOC
  • faker for data mock and to make mock users I've made userHelper that has
getUsersMock(numberOfUsers)

Requirement and features

  • Show list of users
  • Add user
  • Delete user
  • 1 API test
  • 1 React test
  • README!
  • Build mechanism: using default of react-scripts
  • ES6

How to run test

With yarn:

yarn test

With npm:

npm test

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.