DevPath · Learn to code ESPTEN

Executable capstone: an end-to-end task manager

Connecting the layers (and why it works)

Inject the dependencies

Each layer receives the one below it as a parameter, instead of creating it on its own:

const store  = createStore();        // data
const api    = createApi(store);     // the API uses the store
const client = createClient(api);    // the client uses the API (fetch)

This is called dependency injection, and it has two superpowers:

In the exercises you build each layer and, at the end, you connect them into an app that boots, confirming the end-to-end flow works by running it.

Put this into practice

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →
← The layers of a full-stack appView the module →