Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
vdom agnostic components
import preact from 'preact';
import createFoo from './foo';
import createBar from './bar';
export const Foo = createFoo(preact);
export const Bar = createBar(preact);
export default ({ h, createElement=h, Component }) => {
return class Foo extends Component {
render(){ return <div>{}</div> }
import { h, render } from 'preact';
import { Foo, Bar } from './components';
<Foo />
<Bar />
, document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment