Conditional rendering

Pay attention to the Busy component's render function. It includes conditional rendering, which you have not yet used in React:

{this.state.busy && <Busy />}

When this.state.busy is false, the expression resolves as false. React ignores Booleans while rendering, and hence the expression doesn't render anything in this case. Otherwise, when busy is true, the expression resolves to the busy component, which in turn renders.

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

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