React 的离线组件和在线组件
(
)}
/>
```、``、和`` 支持以下属性:
| Prop | Type | Description | 默认值 |
| ------------------ | ----------- | --------------------------------- | ------------------------------ |
| `polling` | Obj or Bool | 配置用于轮询回退 [1] | [参见下面] |
| `polling.enabled` | Boolean | 强制打开或关闭轮询 | 取决于浏览器 [1] |
| `polling.url` | String | 用于池化连接状态的 URL | `"https://ipv4.icanhazip.com"`" |
| `polling.interval` | Number | 多久(以毫秒为单位)进行轮询 | `5000` |
| `polling.timeout` | Number | 连接超时前的时间(以毫秒为单位) | `5000` |
| `onChange` | Function | 连接变化时调用 | 无 |
| `children` [2] | Element(s) | 子元素 **不是检测器** | 无 |
| `render` [3] | Func | 渲染函数 **仅检测器** | 无 |
[1] 只有在不支持 `"online"` 属性的浏览器中,才会使用轮询。暂无开放 Issues,或尚未同步最近议题。