Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function initCache() {
// `createCache` accepts an invalidator function in first argument: https://github.com/facebook/react/blob/master/packages/react-cache/src/ReactCache.js#L152
cache = createCache(initCache);
}
function initCache() {
cache = createCache(initCache);
}
initCache();
import ReactDOM from "react-dom";
import styled from "styled-components";
import { Helmet } from "react-helmet";
import throttle from "lodash.throttle";
import { createCache, createResource } from "react-cache";
import { execute } from "./utils/executor";
import { fetchDoc } from "./utils/fetcher";
import { parse } from "./utils/md-parser";
import Editor from "./editor";
import Contributors from "./contributors";
import TabFrame from "./tab-frame";
import { highlightColor } from "./theme";
import LogoComp from "./logo";
window.React = React;
const cache = createCache();
const docsResource = createResource(fetchDoc);
const Container = styled.div`
max-width: 900px;
flex-direction: column;
flex: 1 1 auto;
padding-left: 70px;
@media (max-width: 700px) {
padding-left: 10px;
}
`;
const Name = styled.div`
font-size: 30px;
font-weight: 400;
`;