import React, { useRef, useEffect, useState } from 'react'; import './Example.less'; export default (props: { route: any }) => { const elm = useRef(); const [height, setHeight] = useState(0); useEffect(() => { setHeight(elm.current.contentWindow.document.documentElement.scrollHeight); }, [elm]); return ( props.route.meta.examplePath && (
{props.route.meta.description || props.route.meta.title}