-
Notifications
You must be signed in to change notification settings - Fork 8
devworkflow
Rosana edited this page Jul 15, 2017
·
2 revisions
Development flow for new features:
-
Start by creating stateless components, just pure mock, advantage of this approach:
- We focus on understanding functionallity.
- We will detect which components need to be broken down into subcomponents.
- We have something visual that can be discussed.
-
Then migrate to a root component that will contain a mock state plus event functions:
- This will let us play with data and mocked actions like (just functions in the root state) without having to jump into the redux layer.
- Once we have it, we will have a clear understanding of the data flow and actions needed to be implemented later on.
-
Move root state and functions to actions, reducer, api's...:
- Final step, now that we have clear what we want to implement is time to move it to all the needed plumbing.
- In this step we will follow TDD to implemented containers, actions and reducers.
Thumbrules to implement unit testing or follow TDD (exceptions may apply):
- Application components: do not implement unit tests on this component unless there's a reason to do it so.
- Reusable components: implement the component and add a unit tests battery (makes sense in this case, it's something that is going to be reused).
- Containers: follow TDD to implement them.
- Actions: follow TDD to implement them.
- Reducers: follow TDD to implemenent them.