@@ -152,11 +152,9 @@ Use hyperscript `h` and pass a **`sel`** as a prop. Use that selector in `source
152152``` js
153153import React from " react" ;
154154import ReactDOM from " react-dom" ;
155- import " ./index.css" ;
156-
157155import { makeComponent , h } from " @cycle/react" ;
158156
159- // react coponent
157+ // React component
160158function 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
172170function 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
191189const 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