Skip to content

Commit 5caea73

Browse files
authored
chore: update documentation example
1 parent f2c6148 commit 5caea73

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ const MyTerminal = () => {
4141
#### `XTerm` component:
4242
4343
```js
44-
import React from 'react'
45-
import { XTerm } from 'react-xtermjs'
46-
4744
const MyTerminal = () => {
4845
const onData = (data) => {
4946
console.log(`Received data: ${data}`)
@@ -55,10 +52,12 @@ const MyTerminal = () => {
5552

5653
return (
5754
<XTerm
58-
onData={onData}
59-
onResize={onResize}
6055
options={{ cursorBlink: true }}
6156
style={{ width: '100%', height: '100%' }}
57+
listeners={{
58+
onData,
59+
onResize,
60+
}}
6261
/>
6362
)
6463
}

0 commit comments

Comments
 (0)