You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The `onChange` attribute is a required prop for controlled inputs. It is called whenever the input's value changes (on every keystroke or selection). Without this handler, React would revert the input to its original value after each change.
110
110
- When a user selects a date, the `handleDateChange` function is called
Please select the weather conditions at the start of your fishing trip.
232
232
</span>
233
233
</FormGroup>
@@ -240,7 +240,7 @@ Add the following code below the `TimePicker` form group:
240
240
-`onChange={handleInputChange}` uses the standard input handler (already present) because the `Select` component behaves like a standard HTML select element in this regard.
241
241
- We define the available weather options using standard HTML `<option>` tags within the `Select` component. The first option has an empty `value` to represent the default, unselected state.
Please select the weather conditions at the start of your fishing trip.
305
305
</span>
306
306
</FormGroup>
307
-
</Form>;
307
+
</Form>
308
308
// diff-add-end
309
309
```
310
310
@@ -316,15 +316,15 @@ Before we learn how to save data to storage in the next lesson, let's first see
316
316
317
317
Open `src/pages/StartTrip.jsx` and locate the `handleSubmit` function. Replace the existing submission logic with the following code that will log the form data to the console:
Copy file name to clipboardExpand all lines: docs/learn/lesson-4.mdx
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ RADFish organizes different types of data into separate **collections**. While o
12
12
13
13
Open `src/index.jsx` and locate the `collections` section within the trip store. **You'll need to add the Catch collection schema after the Form collection as shown in the highlighted lines below:**
14
14
15
-
```jsx title="src/index.jsx" showLineNumbers=60
15
+
```jsx title="src/index.jsx" showLineNumbers=66
16
16
},
17
17
},
18
18
// diff-add-start
@@ -91,8 +91,7 @@ First, we need to access the RADFish Catch collection within our form submission
91
91
92
92
Open `src/pages/CatchLog.jsx` and locate the `handleAddCatch` function. Find the comment `// Create record in RADFish/IndexedDB` and replace it with the following code:
0 commit comments