File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,14 +14,13 @@ import PropTypes from 'prop-types';
1414 render={({ startPolling, stopPolling, isPolling }) => {
1515 if(isPolling) {
1616 return (
17- <div> Hello I am polling</div>
18- <Spinner / >
17+ <div>
18+ <p>Hello I am polling<p >
1919 </div>
2020 );
2121 } else {
2222 return (
23- <div> Hello I stopped polling</div>
24- </div>
23+ <div>Hello I stopped polling</div>
2524 );
2625 }
2726 }}
@@ -157,14 +156,14 @@ export class ReactPolling extends React.Component {
157156 render ( ) {
158157 if ( this . props . render ) {
159158 return this . props . render ( {
160- startPolling : this . startPolling ,
161- stopPolling : this . stopPolling ,
159+ startPolling : this . startPolling . bind ( this ) ,
160+ stopPolling : this . stopPolling . bind ( this ) ,
162161 isPolling : this . state . isPolling
163162 } ) ;
164163 }
165164 return this . props . children ( {
166- startPolling : this . startPolling ,
167- stopPolling : this . stopPolling ,
165+ startPolling : this . startPolling . bind ( this ) ,
166+ stopPolling : this . stopPolling . bind ( this ) ,
168167 isPolling : this . state . isPolling
169168 } ) ;
170169 }
You can’t perform that action at this time.
0 commit comments