Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Fast network always
// slow initial load
// show loading quickly on initial load, don't show top level placeholder on navigation
import React from "react";
import { Router, Link, Redirect, globalHistory } from "@reach/router";
import {
login,
getContacts,
getContact,
createContact,
updateContact,
deleteContact
} from "./utils";
import createContext from "create-react-context";
globalHistory.listen(({ location, action }) => {
console.log({ location, action });
});
const InvalidateContacts = createContext();
const withInvalidateContacts = Comp => props => (
{invalidate => }
);
const NavLink = props => (
({
className: isPartiallyCurrent ? "nav-link active" : "nav-link"
})}
{...props}
subscribe: callback => globalHistory.listen(callback),
}),