You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Both regular functions and factory functions accept a single argument named `deps`, combining one or more dependencies (e.g., `A & B & C`).
255
255
- Sort dependencies alphabetically in ascending order when combining them.
256
256
@@ -369,7 +369,7 @@ const result = timeUntilEvent(deps)(1742329310767);
369
369
-`eventTimestamp` is just a number—it's not a dependency because it’s local to the function’s logic.
370
370
-`time` is a dependency because it interacts with the outside world (`Date.now()`).
371
371
372
-
**Key takeaway**: Use dependencies for external interactions (I/O, side effects) and keep regular arguments for pure, local data. At the composition root, assemble your `deps` object once and pass it where needed—over-providing is fine, as shown in the Example(#example) section!
372
+
**Key takeaway**: Use dependencies for external interactions (I/O, side effects) and keep regular arguments for pure, local data. At the composition root, assemble your `deps` object once and pass it where needed—over-providing is fine, as shown in the [Example](#example) section.
373
373
374
374
**Why shouldn't dependencies use generic arguments?**
0 commit comments