Code Monkey home page Code Monkey logo

randomuser's Introduction

How To Run

Make sure your node is above v14

Clone this repository

$ git clone https://github.com/MuhammadChandra19/randomuser

Install Dependencies

$ yarn

Run dev server

$ yarn start

Project structure

/
├── build/
    |── index.html
├── src/
    |── api/
    |    ├── base.api.ts
    |    └── yourapi.ts
    |── utils/
    |     └── testUtil/
    └── views/
    |    |── components
    |    └── __tests__
    └── styles

References

1. API

This folder stores all HTTP requests to backend. You extends BaseAPI class and use the makeRequest

makeRequest(url);

Example :

class YourAPI extends BaseAPI {
  constructor() {
    super('/api')
  }

  public async getExample(params: Params): Promise<APIResponse<Example[]>> {
    return this.makeRequest('GET', '', params)
  }
}

export const yourAPI = new YourAPI()

2. utils

Utils folder contains helper methods. A helper method is a method that helps another method to perform it's task. These are typically used when a method has to perform a complicated task that is composed of several smaller tasks. The smaller tasks are often performed by helper methods.

Resources

randomuser's People

Contributors

muhammadchandra19 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.