Skip to content

Instantly share code, notes, and snippets.

View coderkan's full-sized avatar
🏠
Working from home

Erkan Güzeler coderkan

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
</head>
<body>
<h1>Date Range Example</h1>
@coderkan
coderkan / axios-all-example.js
Created October 31, 2021 19:08
axios-all-example
let reqOne = axios.get('https://api.github.com/repos/stedolan/jq/commits');
let reqTwo = axios.get('https://api.github.com/repos/coderkan/spring-boot-redis-cache/commits');
axios.all([reqOne, reqTwo]).then(axios.spread((…res) => {
 console.log(res[0]);
 console.log(res[1]);
 // you can also set your states.
this.setState(
{
  reqOneCount: res[0].data.length,