Skip to main content

How to use RunCode

Getting Started

use.mdx
import RunCode from '@site/src/components/RunCode';
import LoadJS from '@site/src/components/LoadJS';

export const code = `const url = 'https://drand.cloudflare.com/public/latest';\n
const res = await axios
.get(url)
.then((r) => r);\n
console.log(res.data);
`;

<RunCode title="Default test" minHeight={50} />

<LoadJS url="https://unpkg.com/axios/dist/axios.min.js" />

<RunCode value={code} title="axios example" minHeight={200} />
Default test
axios async example
axios async example