File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,12 @@ npm i react-polling --save
2525import React from ' react' ;
2626
2727< ReactPolling
28- interval= {3000 }, // in milliseconds(ms)
28+ url= {' url to poll' }
29+ interval= {3000 } // in milliseconds(ms)
2930 retryCount= {3 } // this is optional
3031 onSuccess= {() => console .log (' handle success' )}
3132 onFailure= {() => console .log (' handle failure' )} // this is optional
32- method= {' GET' },
33+ method= {' GET' }
3334 headers= {headers object} // this is optional
3435 body= {JSON .stringify (data)} // data to send in a post call. Should be stringified always
3536 render= {({ startPolling, stopPolling, isPolling }) => {
Original file line number Diff line number Diff line change @@ -3,11 +3,12 @@ import PropTypes from 'prop-types';
33
44/**
55<ReactPolling
6- interval= {3000}, // in milliseconds(ms)
6+ url={'url to poll'}
7+ interval= {3000} // in milliseconds(ms)
78 retryCount={3} // this is optional
89 onSuccess={() => console.log('handle success')}
910 onFailure={() => console.log('handle failure')} // this is optional
10- method={'GET'},
11+ method={'GET'}
1112 headers={headers object} // this is optional
1213 body={JSON.stringify(data)} // data to send in a post call. Should be stringified always
1314 render={({ startPolling, stopPolling, isPolling }) => {
You can’t perform that action at this time.
0 commit comments