- simplifies pagination
- pass structure, next page, previous page, etc should be kept in mind
- JSON serialization must apply to everything
- use .values() for QuerySet, wrap result with list() e.g. for Paginator
import { useReducer, useEffect } from "react"; | |
import firebase from "firebase/compat/app"; | |
import { User as FirebaseUser } from "firebase/auth"; | |
import { | |
IAuthProvider, | |
mainReducer, | |
initialState, | |
AuthUserActionsTypes, | |
formatAuthUser, | |
authUserContext, |
import React from 'react'; | |
const ConditionalWrap = ({condition, wrap, children}) => condition ? wrap(children) : children; | |
const Header = ({shouldLinkToHome}) => ( | |
<div> | |
<ConditionalWrap | |
condition={shouldLinkToHome} | |
wrap={children => <a href="/">{children}</a>} | |
> |
<?xml version="1.0" encoding="UTF-8"?> | |
<gpx creator="StravaGPX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3"> | |
<metadata> | |
<time>2020-09-01T22:39:17Z</time> | |
</metadata> | |
<trk> | |
<name>Two a day keeps the lethargy away - Evening Ride ☀️</name> | |
<type>1</type> | |
<trkseg> | |
<trkpt lat="40.6554810" lon="-73.9631390"> |
async function sleep(num) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, num) | |
} | |
} | |
async function execute() { | |
await sleep(10) | |
await stepOne() | |
} |
async function sleep(num) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, num) | |
} | |
} | |
async function execute() { | |
await sleep(10) | |
await stepOne() | |
} |
process.on('unhandledRejection', (reason, promise) => { | |
console.log(`Unhandled rejection at ${promise}`) | |
console.log(`Message ${reason}`) | |
}) | |
const willThrowErrors = async () => { | |
return new Promise(function shouldBeCaught(resolve, reject) { | |
reject(`I should be caught and handled with!`) | |
}) | |
} |
[ | |
{ | |
"id": 1, | |
"name": "Daniels", | |
"email": "[email protected]", | |
"message": "Sit anim amet minim aliqua sit aute cupidatat ea nisi tempor cupidatat velit nisi tempor." | |
}, | |
{ | |
"id": 2, | |
"name": "Hamilton", |
export default [ | |
{ | |
client: "Puma", | |
name: "MBBQ Factory", | |
company: "KBSP", | |
description: "PUMA online custom shoe website, offering thousands of unique design combinations and user boutiques.", | |
collaborators: [{ | |
link: "https://figurea.net/PUMA-Factory" | |
name: "figurea, Creative Direction & Design" | |
}] |
git log --numstat >filename.txt