Files
mqtt-explorer/app/src/components/Demo/index.tsx
2019-06-15 14:56:57 +02:00

27 lines
457 B
TypeScript

import * as React from 'react'
import ShowText from './ShowText'
import Mouse from './Mouse'
let heapdump: any
function writeHeapdump(path?: string) {
if (!heapdump) {
heapdump = require('heapdump')
}
heapdump.writeSnapshot(path || `${Date.now()}.heapsnapshot`)
return path
}
;(window as any).demo = {
writeHeapdump,
}
export default function render(props: any) {
return (
<span>
<ShowText />
<Mouse />
</span>
)
}