摘要:
In this lesson, we walk through how to use one of React's Test Utilities (from thereact-addons-test-utilspackage) called "Shallow Rendering". This let... 阅读全文
摘要:
JSON(JavaScript Object Notation) is a standard method to serialize JavaScript objects and is commonly used to transfer data from the server to the bro... 阅读全文
摘要:
To write tests for our React code, we need to first install some libraries for running tests and writing assertions. In this lesson we walk through se... 阅读全文
摘要:
We can use the destructing and rest parameters at the same time when dealing with Array opration.Example 1:let [first, ...remainingUsers] = ["Sam", "T... 阅读全文
摘要:
The spread operator allow us to split an Array arguement into individual elements.getRequest("/topics/17/tags", function(data){ let tags = data.tag... 阅读全文
摘要:
1. Default Value of function param:The functiondisplayTopicsPreview()raises an error on the very first line when called with no arguments. Let's fix t... 阅读全文
摘要:
we leverage private components to break our render function into more manageable pieces without leaking the implementation details of our component. ... 阅读全文