snapshot of https://github.com/excalidraw/excalidraw.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Tests / test (push) Failing after 15s
Some checks failed
Tests / test (push) Failing after 15s
This commit is contained in:
9
packages/excalidraw/hooks/useTransition.ts
Normal file
9
packages/excalidraw/hooks/useTransition.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import React, { useCallback } from "react";
|
||||
|
||||
/** noop polyfill for v17. Subset of API available */
|
||||
function useTransitionPolyfill() {
|
||||
const startTransition = useCallback((callback: () => void) => callback(), []);
|
||||
return [false, startTransition] as const;
|
||||
}
|
||||
|
||||
export const useTransition = React.useTransition || useTransitionPolyfill;
|
||||
Reference in New Issue
Block a user