mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Merge pull request #10316 from overleaf/mj-cm6-outline-debouncing
[cm6] Debounce EditorState in CM6 outline GitOrigin-RevId: 759748f1d3dabbe22dc0cd2d3d989c973753442a
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
|
||||
/**
|
||||
* @template T
|
||||
* @param {T} value
|
||||
* @param {number} delay
|
||||
* @returns {T}
|
||||
*/
|
||||
export default function useDebounce(value, delay = 0) {
|
||||
const [debouncedValue, setDebouncedValue] = useState(value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user