Comparing two approaches for providing a dependent layer
Hello effect experts, I'd like to understand some detail regarding layers. What would be better approach of providing dependent layer: or
const DefaultS3ClientInstanceLayer = Layer.effect(
S3ClientInstanceTag,
S3ClientConfigTag.pipe(
Effect.map((config) => new S3Client(config)),
Effect.provideLayer(DefaultS3ClientConfigLayer),
),
);const DefaultS3ClientInstanceLayer = Layer.provide(
DefaultS3ClientConfigLayer,
Layer.effect(
S3ClientInstanceTag,
S3ClientConfigTag.pipe(Effect.map((config) => new S3Client(config))),
),
);