This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useContext, useEffect, useMemo, useState } from "react" | |
type ProviderComponent<T> = React.FC<{ initialValue: T }> | |
interface PrivateContextValue<T> { | |
useGlobalStateProxy(): T | |
} | |
class GlobalStateContext<T> { | |
constructor(private context: React.Context<PrivateContextValue<T>>, public Provider: ProviderComponent<T>) {} | |
} | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fetch = require('node-fetch'); | |
var fs = require('fs'); | |
const { | |
buildClientSchema, | |
introspectionQuery, | |
printSchema, | |
} = require('graphql/utilities'); | |
console.log(introspectionQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {send} = require('micro'); | |
const bent = require('bent'); | |
const wae = require('web-auto-extractor').default; | |
const https = require('https'); | |
const pelo = require('pelo'); | |
const url = require('url'); | |
const cheerio = require('cheerio'); | |
const {GOODREADS_KEY} = require('./settings'); | |
const getJSON = bent('json', 200); | |
const getText = bent('string', 200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns nested-routing.core | |
(:require [goog.events :as events] | |
[goog.history.EventType :as EventType] | |
[reagent.core :as reagent] | |
[reagent.ratom :refer-macros [reaction]] | |
[re-frame.core :refer [dispatch dispatch-sync register-handler register-sub subscribe]] | |
[secretary.core :as secretary :refer-macros [defroute]]) | |
(:import goog.History)) | |
(declare route-components |