Dropping rxgo (#201)
* rxgo event source to channel with drop strategy * code optimizations
This commit is contained in:
@@ -22,8 +22,8 @@ const LogTerminal: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
eventSource.addEventListener('log', event => {
|
||||
const msg: string[] = JSON.parse(event.data)
|
||||
setLogBuffer(buff => [...buff, ...msg].slice(-500))
|
||||
const msg: string = JSON.parse(event.data)
|
||||
setLogBuffer(buff => [...buff, msg].slice(-500))
|
||||
|
||||
boxRef.current?.scrollTo(0, boxRef.current.scrollHeight)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user