Skip to content

Commit a960ba7

Browse files
authored
Spruce up the readme
1 parent cefff4a commit a960ba7

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
2+
<h1 align="center">
3+
HTM (Hyperscript Tagged Markup)
4+
<a href="https://www.npmjs.org/package/htm"><img src="https://img.shields.io/npm/v/htm.svg?style=flat" alt="npm"></a>
5+
</h1>
16
<p align="center">
2-
<img src="https://i.imgur.com/09ih11e.jpg" width="715" alt="hyperscript tagged markup demo">
3-
<h1 align="center">
4-
HTM (Hyperscript Tagged Markup)
5-
<a href="https://www.npmjs.org/package/htm"><img src="https://img.shields.io/npm/v/htm.svg?style=flat" alt="npm"></a>
6-
</h1>
7+
<img src="https://i.imgur.com/09ih11e.jpg" width="572" alt="hyperscript tagged markup demo">
78
</p>
89

910
`htm` is **JSX-like syntax in plain JavaScript** - no transpiler necessary.
@@ -142,14 +143,14 @@ It's a single HTML file, and there's no build or tooling. You can edit it with n
142143
<li>${todo}</li>
143144
`)}
144145
</ul>
145-
<button onClick=${this.addTodo.bind(this)}>Add Todo</button>
146+
<button onClick=${() => this.addTodo()}>Add Todo</button>
146147
<${Footer}>footer content here<//>
147148
</div>
148149
`;
149150
}
150151
}
151152
152-
const Header = ({ name }) => html`<header><h1>${name} List</h1></header>`
153+
const Header = ({ name }) => html`<h1>${name} List</h1>`
153154
154155
const Footer = props => html`<footer ...${props} />`
155156

0 commit comments

Comments
 (0)