From 82ba521726eab8184eee6542f278d3ba42192b9d Mon Sep 17 00:00:00 2001 From: Iwo Plaza Date: Mon, 8 Jul 2024 23:55:47 +0200 Subject: [PATCH] fix: remove remeda from derive implementation. --- src/derive.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/derive.ts b/src/derive.ts index 96727d0..473eeff 100644 --- a/src/derive.ts +++ b/src/derive.ts @@ -1,5 +1,4 @@ import { type Atom, type ExtractAtomValue, atom } from 'jotai/vanilla'; -import { pipe } from 'remeda'; import { soon } from './soon.js'; import { soonAll } from './soonAll.js'; @@ -32,11 +31,11 @@ export function derive< ): Atom>> { return atom((get) => { try { - return pipe( + return soon( soonAll(deps.map(get) as ExtractAtomsValues) as PromiseOrValue< AwaitAtomsValues >, - soon((values) => op(...values)), + (values) => op(...values), ) as TValue | Promise>; } catch (err) { return Promise.reject(err);