Clarification on redundant layer provision?
While following the documentation, I noticed the following setup:
This approach feels somewhat counterintuitive to me, as it seems redundant to provide the same ConfigLive twice. Could you clarify if this redundancy is necessary or if there’s a more concise way to achieve the same result? I’d like to make sure I’m using the library correctly and efficiently.
const AppConfigLive = Layer.merge(ConfigLive, LoggerLive)
const MainLive = DatabaseLive.pipe(
// provides the config and logger to the database
Layer.provide(AppConfigLive),
// provides the config to AppConfigLive
Layer.provide(ConfigLive)
)This approach feels somewhat counterintuitive to me, as it seems redundant to provide the same ConfigLive twice. Could you clarify if this redundancy is necessary or if there’s a more concise way to achieve the same result? I’d like to make sure I’m using the library correctly and efficiently.
