Skip to content

Instantly share code, notes, and snippets.

@BigAB

BigAB/index.html Secret

Created June 5, 2017 15:41
Show Gist options
  • Save BigAB/ae311de12272af411969f477e6f8c1a5 to your computer and use it in GitHub Desktop.
Save BigAB/ae311de12272af411969f477e6f8c1a5 to your computer and use it in GitHub Desktop.
Steal Config Map Issue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Using Preact with Steal</title>
<script src="/node_modules/steal/steal.js" main="main"></script>
</head>
<body>
<div id="app"></div>
</body>
</html>
import React from "react";
import { render } from "react-dom";
const App = props =>
<div>
<h1>{props.value}</h1>
<p>This is the {props.value} component.</p>
<input value={props.value} onChange={props.onChange} />
</div>;
render(<App value="Home" />, document.getElementById("app"));
{
"name": "preact-with-steal",
"version": "0.0.1",
"main": "main.js",
"author": "BigAB <bigab@live.ca> (http://bigab.net)",
"dependencies": {
"preact": "^8.1.0",
"preact-compat": "^3.16.0"
},
"devDependencies": {
"steal": "^1.5.2",
"steal-tools": "^1.3.5"
},
"steal": {
"map": {
"react": "preact-compat",
"react-dom": "preact-compat"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment