Skip to content

Commit a652d02

Browse files
committed
updated documentation
1 parent 20fffc2 commit a652d02

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build Status](https://travis-ci.org/nitin42/react-perf-devtool.svg?branch=master)](https://travis-ci.org/nitin42/react-perf-devtool)
44
![Release Status](https://img.shields.io/badge/status-stable-brightgreen.svg)
55
![Author](https://img.shields.io/badge/author-Nitin%20Tulswani-lightgrey.svg)
6-
![current-version](https://img.shields.io/badge/version-3.0.8-blue.svg)
6+
![current-version](https://img.shields.io/badge/version-3.1.8-blue.svg)
77
![extension](https://img.shields.io/badge/extension-5.3-ff69b4.svg)
88
> A devtool for inspecting the performance of React Components
99
@@ -175,15 +175,20 @@ You can pass an **option** object as an argument to `registerObserver` to enable
175175
{
176176
shouldLog: boolean, // default value: false
177177
port: number // default value: 8080
178+
timeout: number // default value: 2000
178179
}
179180
```
180181

181-
You can pass two properties to the **`option`** object, `shouldLog` and `port`.
182+
You can pass three properties to the **`option`** object, `shouldLog` and `port`.
182183

183184
* `shouldLog` - It takes a **boolean** value. If set to true, measures will be logged to the console.
184185

185186
* `port` - Port number for the server where the measures will be send
186187

188+
* `timeout` - A timeout value to defer the initialisation of the extension.
189+
190+
If your application takes time to load, it's better to defer the initialisation of extension by specifying the timeout value through `timeout` property. This ensures that the extension will load only after your application has properly loaded in the browser so that the updated measures can be rendered. However, you can skip this property if your application is in small size.
191+
187192
**Example**
188193

189194
```js
@@ -197,7 +202,8 @@ const Component = require('./Component') // Some React Component
197202

198203
const options = {
199204
shouldLog: true,
200-
port: 8080
205+
port: 8080,
206+
timeout: 12000 // Load the extension after 12 sec.
201207
}
202208

203209
function callback(measures) {

0 commit comments

Comments
 (0)