Usage: just import the code from somewhere.
import './upgrade-polyfill';
| /** | |
| * Markdown Component | |
| */ | |
| const Markdown = React.memo(({ children, length, allowImages, renderAsPlaintext, linkifyHeadings }) => { | |
| let rendered = md({ allowImages, linkifyHeadings }).render(children || ''); | |
| let className = styles.markdownContent; | |
| if (length > 0) { | |
| rendered = truncate(rendered, length, { ellipsis: '…' }); |
| const express = require('express'); | |
| const htm = require('htm'); | |
| const vhtml = require('vhtml'); | |
| // create an html`` tag function for vhtml: | |
| const html = htm.bind(vhtml); | |
| const App = (props) => html` | |
| <div class="app"> | |
| <h1>This is an app</h1> |
| const express = require('express'); | |
| const { html, Component } = require('htm/preact'); | |
| const renderToString = require('preact-render-to-string'); | |
| class App extends Component { | |
| render(props) { | |
| return html` | |
| <div class="app"> | |
| <h1>This is an app</h1> | |
| <p>Current server time: ${new Date + ''}</p> |
Preact is a fast 3kB alternative to React with the same modern API.
This example uses shows how to use Material UI 4 with Preact X and Preact CLI 3.
git clone blah preact-mui| .evaluateTypeof() | |
| .evaluate() | |
| .evaluateIdentifier() | |
| .evaluateDefinedIdentifier() | |
| .evaluateCallExpressionMember() | |
| .statement(statement) | |
| .statementIf(statement) | |
| .label() | |
| .import(statement,source) | |
| .importSpecifier(statement,source,exportName,identifierName) |
A tiny CLI tool to print the gzipped sizes of files matching a glob pattern.
gzip-sizes [...pattern] [options]
Options: