mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-02-18 10:01:02 -05:00
fix(curriculum): enforce heroName and realName initial state value in step 2 (#65856)
This commit is contained in:
@@ -40,7 +40,7 @@ Your `useState` hook for `heroName` should have an initial value of empty string
|
||||
const _a = eval(script);
|
||||
const _b = await __helpers.prepTestComponent(exports.SuperheroForm);
|
||||
|
||||
assert.equal(abuseState.calls[0]?.[0], "");
|
||||
assert.strictEqual(abuseState.calls[0]?.[0], "");
|
||||
```
|
||||
|
||||
You should use the array destructuring syntax to set a `realName` state variable and a `setRealName` setter.
|
||||
@@ -70,7 +70,7 @@ Your `useState` hook for `realName` should have an initial value of empty string
|
||||
const _a = eval(script);
|
||||
const _b = await __helpers.prepTestComponent(exports.SuperheroForm);
|
||||
|
||||
assert.equal(abuseState.calls[1]?.[0], "");
|
||||
assert.strictEqual(abuseState.calls[1]?.[0], "");
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user