Fishing Spot Booking — React

Run Lapak Banyu on the fishing pond’s tablet: event handlers, styles, TypeScript and React tests. 16 levels, right in the browser.

What the levels ask

  1. Mr. Karim opens Banyu Stall on the tablet to book a stall (a fishing spot on the bank), reads the screen, then taps Pesan lapak 1. The pond's server must receive exactly one booking, and only after he taps. Fill in onClick in App.jsx.
  2. The stall list now has four rows, each with its own Pesan button. Mrs. Lastri wants stall 4 in the corner, by the kersen tree. The pesan function needs the stall number. Fill in onClick on the stall row so Mrs. Lastri's tap books stall 4, and only stall 4.
  3. Mr. Tono can only fish in the afternoon. The form for stall 2 has Pagi (morning), Sore (afternoon) and a Kirim (send) button. He picks Sore, then taps Kirim. The afternoon booking must arrive, and the tablet must stay on the same page with its confirmation. Fill in the first line of kirim in App.jsx.
  4. A stall card can be tapped to show its details, and each card has a Pesan button. Mrs. Sari taps Pesan on stall 3's card. Her booking must arrive, and the details sheet must not open with it. Fill in the first line of the button's handler in KartuLapak.
  5. Ms. Wulan says the stall cards are squashed together and hard to read from a distance. Mr. Banyu wants 8 px of space above each card, written right in the component. Fill in the style prop in KartuLapak.jsx.
  6. Mr. Bayu taps Lapak 2: the selected card should get an orange border. The weighing board below it colours the row being weighed pink. Both use a class named aktif. Fill in the selector in KartuLapak.css and its class in KartuLapak.jsx so each component gets only its own rule.
  7. Stall 2 has been full since yesterday. Dina taps the card Lapak 3: kosong (free) to take it. A full stall should be grey, a free one stays white, and every card keeps its border. Fill in className in KartuLapak.jsx.
  8. From today the code is TypeScript, and Bagas writes some of it from his phone. The galatama (fishing contest) board shows each stall's points: the fish's weight times 100. Today's points must be right, and tsc must hold Bagas's change if the weight he sends is not a number. Fill in the type of berat in KartuLapakProps.
  9. The Papan component wraps anything under its title. Stall 3's board holds Mr. Karim's name in bold and his catch's weight; Bagas's change adds stall 5's board with plain text. Both are correct and must pass the build. Fill in the type of children in PapanProps.
  10. Rara ticks Ikut galatama (enter the contest), then changes her mind. The checkbox must follow: yes when ticked, not yet when unticked. Bagas sent a version that reads e.target.value. Fill in the type of e in IkutLomba.tsx so today's code builds and Bagas's change is held.
  11. Mr. Harun reads two lists, this morning's catch and the angler at each stall, through one Daftar (list) component that does not know what it holds. Bagas sends a list of weights per stall, but stall data has no weight. Complete the signature of Daftar so both of today's lists pass and Bagas's change is held.
  12. The Pesan button now shows a +; its name is read through aria-label. Yesterday Bagas turned it into a <div>, which the keyboard cannot reach and screen readers do not know as a button. Fill in the query in the test so it passes on today's card and fails on Bagas's version.

And more, 16 levels in all.