In this document, you’ve learned how to write a Tic-Tac-Toe application using ZLayers. I hope you’ve been able to appreciate the great power that ZLayer gives for building modular and composable applications in a more accessible and understandable way. At the same time, we have written some tests and seen how easy it is to define mock environments as ZLayers that can be provided for tests to make them executable.
I hope the concepts related to the ZLayer data type are more clear to you now (if they weren’t before), and that you start using it in your own applications to make them extremely modular and composable!
Finally, here are some nice articles that are also related to ZLayer:
And also, you can take a look to this pretty interesting talk by Vladimir Pavkin, one of our developers at Scalac: Functional World #1 – ZIO inception