March 2018
Beginner to intermediate
344 pages
7h 7m
English
An important part of the component design is ensuring that your components are testable. You should think of each component as a standalone module in your application that could be switched in/out, as necessary; as a result, it should not be tightly coupled with another component.
The best way is to ensure that your components are testable after ensuring that light coupling is to have a well-defined public API via component props and then use events to communicate between the parent/child component. This also helps us when testing, as we're able to mock components much easier.
A common pattern to use when following this model is the container/presentational components. This means we keep all of ...
Read now
Unlock full access