Book Image

Jasmine JavaScript Testing Update

By : Paulo Vitor Zacharias Ragonha
Book Image

Jasmine JavaScript Testing Update

By: Paulo Vitor Zacharias Ragonha

Overview of this book

Table of Contents (15 chapters)


React is a rapidly evolving library that is getting a lot of traction by the JavaScript community; it introduced some interesting patterns and questioned some well-established dogmas as it is continually improving the development of rich web applications.

This chapter's goal was not to give an in-depth look into the library but an overview of its primary features and philosophies. It demonstrated that it is possible to do test-driven development while coding your interface with React.

You learned about prop and state and their differences: A prop is not owned by the component, and should, if needed, be changed by its parent. The state is the data that the component owns. It can be changed by the component, and by doing so, a new render is triggered.

The fewer components with state you have in your application, the easier it is going to be to reason about it and test it.

It is through React's opinionated API and life cycle that we can get the maximum benefit of composability and code...