动手做Get your hands on it
练习跟着课文走 —— 每节课尾都有本课的练习。这一页是全部练习的总库,想集中刷题的时候来。 每个练习都写清了它来自哪一节,卡住了就回去看那一节。Practice follows the lessons — every lesson ends with the exercises for that lesson. This page is the whole library, for when you want to drill in one sitting. Each exercise names the lesson it came from, so you can go back when you stall.
练习Exercises
筛出 47 个练习(共 148 个) · 第 4 / 4 页。Showing 47 of 148 · page 4 / 4.五个空。第 2、4、5 个是这道题真正的得分点。
Five blanks. Numbers 2, 4 and 5 are where the credit in this question actually is.
查一个没有订单的用户,整个 data 变成了null,而且 errors 里有一条很长的消息。
You query a user who has no orders, the whole data turns into null, and errors carries one very long message.
Java 那边。mvn test 全过, 但客户端传小写的 shipped 时服务返回 500。
This one is on the Java side. mvn test passes everything, but the service returns 500 when the client sends the lowercase shipped.
四个空。第 2 个用错会导致「点自己内部也关掉」, 第 4 个漏了会泄漏监听器。
Four blanks. Get the 2nd one wrong and a click inside the dropdown closes it too; miss the 4th one and you leak a listener.
四个空。第 3 个空是这道题的加分点, 第 4 个空写错会让 reducer 不纯。
Four blanks. The 3rd one is the bonus point of this question; get the 4th one wrong and the reducer is no longer pure.
no-ride-title, 有记录的时候只能出现 history-cabs。把三个空填上。When it is empty only no-ride-title may appear; when there are records only history-cabs may appear. Fill in the three blanks.confirm-message」, 而 DOM 快照显示页面还停在 loading。 先读报错,再看下面那个 Loading 组件 ——它和源项目差一个东西。Test 3 reports that it cannot find confirm-message, and the DOM snapshot shows the page still sitting on loading. Read the error first, then look at the Loading component below — one thing in it differs from the source project.npm install 成功,npx vitest run 却是下面这个输出。注意最后一行的「no tests」。The README says to run the finished answer first to get used to the flow. npm install succeeds, and npx vitest run gives the output below. Look at the “no tests” on the last line.cab-booking-context/src/context/CabContext.js