From f3fecdc8ed8a939f50dab37280e334bb845030de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Thu, 26 Dec 2024 16:01:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85Color=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=96=87=E7=9A=84=E7=B1=BB=E5=9E=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ColorFunctionContext.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ColorFunctionContext.tsx b/src/ColorFunctionContext.tsx index d76e966..06f1798 100644 --- a/src/ColorFunctionContext.tsx +++ b/src/ColorFunctionContext.tsx @@ -23,11 +23,12 @@ export function ColorFunctionProvider({ children }: WasmProviderProps) { const [error, setError] = useState(null); const contextValue = useMemo( - () => ({ - colorFn: wasmInstance, - isLoading: isPending, - error, - }), + () => + ({ + colorFn: wasmInstance, + isLoading: isPending, + error, + } as ColorFunctionContextType), [wasmInstance, isPending, error], ); useEffect(() => {