ReactJS » Components as Modules

LearnJS » » React 101

👉 User Story:

As a developer
Given the codebase of the "render-todos" challenge
In order to better organize my code
I would like to split my codebase in different modules

You can try things out directly on this sandbox:

Tip: look into import/export in Javascript (ES6), also, you'd better fork the exercise into your own account as you will need to create new files!

✅ Proposed Solution:

Don't run this unless you gave a very good effort to solve it yourself!

This solution contains a files and folders structure that implement the Single Responsibility Principle at component level.

Each component is responsible for just one thing, and delegates sub-responsibilities to sub-components.

Take your time to navigate the codebase and read the comments carefully as they will help you understanding what is going on and how I splitted the code.

Edit pure-components-exercise

🤓 Resources:


💬 Comments & New Ideas:

results matching ""

    No results matching ""