Skip to content

Commit 59653b8

Browse files
committed
✏️ updated the README with url prop instructions
1 parent 2c61a3a commit 59653b8

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ npm i react-polling --save
2525
import 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 }) => {

src/ReactPolling.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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 }) => {

0 commit comments

Comments
 (0)