What You Learned

Storing logic in separate functions, in addition to giving you more freedom to reorganize your components, makes your code more testable.

To test components, isolate slices of the application with Enzyme and check that props propagate correctly from parent to children.

Snapshots verify that you did not introduce undesired changes into how your React elements render.

Writing good tests forces you to think about the boundaries between components: that is precisely what you need to avoid spreading state everywhere.

Now that you’ve got testing under your belt, you’re ready to tackle more complex architectures. In the next chapter, you will learn how to use the Redux architecture.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.154.252