Skip to content

Commit 9b49faf

Browse files
authored
Fix typos in an example in the readme
1 parent dac7372 commit 9b49faf

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

readme.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,9 @@ Use hyperscript `h` and pass a **`sel`** as a prop. Use that selector in `source
152152
```js
153153
import React from "react";
154154
import ReactDOM from "react-dom";
155-
import "./index.css";
156-
157155
import { makeComponent, h } from "@cycle/react";
158156

159-
// react coponent
157+
// React component
160158
function Welcome(props) {
161159
return (
162160
<div>
@@ -168,18 +166,18 @@ function Welcome(props) {
168166
);
169167
}
170168

171-
// cyclejs component
169+
// Cycle.js component that uses the React component above
172170
function main(sources) {
173171
const click$ = sources.react
174-
.select("welcomeSel")
175-
.events("pressWelcomeButton")
172+
.select('welcome')
173+
.events('pressWelcomeButton')
176174
.debug('btn')
177175
.startWith(null);
178176

179177
const vdom$ = click$.map(click =>
180-
h("div", [
181-
h(Welcome, { sel: "welcomeSel", name: "madame" }),
182-
h("h3", [`button click event stream: ${click}`])
178+
h('div', [
179+
h(Welcome, { sel: 'welcome', name: 'madame' }),
180+
h('h3', [`button click event stream: ${click}`])
183181
])
184182
);
185183

@@ -189,8 +187,9 @@ function main(sources) {
189187
}
190188

191189
const Component = makeComponent(main);
192-
ReactDOM.render(<Component />, document.getElementById("root"));
190+
ReactDOM.render(<Component />, document.getElementById('root'));
193191
```
192+
194193
</p>
195194
</details>
196195

0 commit comments

Comments
 (0)