@_developit on Twitter
@developit on GitHub
Works at Synacor
Lives in Ontario Canada
How fast can we show some content?
What about interactions that require JavaScript?
How fast can we make things actually work?
A way to import less
but keep our approach.
resolve: {
alias: {
'react': 'preact-compat',
'react-dom': 'preact-compat'
}
}
webpack.config.js
Then pretend nothing happened.
resolve: {
alias: {
'react': 'preact',
'react-dom': 'preact'
}
}
webpack.config.js
import React, { Component } from 'react';
export class Title extends Component {
render() {
return <h1>{this.props.title}</h1>
}
}
components/Title.js
import { h, Component } from 'preact';
import { connect } from 'preact-redux';
@connect( state => ({
title: state.title
}))
export class Title extends Component {
render({ title }) {
return <h1>{title}</h1>
}
}
Provide React's paradigm
in as few bytes as possible