We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2c6148 commit 5caea73Copy full SHA for 5caea73
1 file changed
README.md
@@ -41,9 +41,6 @@ const MyTerminal = () => {
41
#### `XTerm` component:
42
43
```js
44
-import React from 'react'
45
-import { XTerm } from 'react-xtermjs'
46
-
47
const MyTerminal = () => {
48
const onData = (data) => {
49
console.log(`Received data: ${data}`)
@@ -55,10 +52,12 @@ const MyTerminal = () => {
55
52
56
53
return (
57
54
<XTerm
58
- onData={onData}
59
- onResize={onResize}
60
options={{ cursorBlink: true }}
61
style={{ width: '100%', height: '100%' }}
+ listeners={{
+ onData,
+ onResize,
+ }}
62
/>
63
)
64
}
0 commit comments