Skip to content

Commit 9b68be9

Browse files
authored
Clean up example code in you-might-not-need-an-effect.md
Removed unnecessary lines from the example code.
1 parent 085b5f2 commit 9b68be9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/content/learn/you-might-not-need-an-effect.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ To help you gain the right intuition, let's look at some common concrete example
3535
Suppose you have a component with two state variables: `firstName` and `lastName`. You want to calculate a `fullName` from them by concatenating them. Moreover, you'd like `fullName` to update whenever `firstName` or `lastName` change. Your first instinct might be to add a `fullName` state variable and update it in an Effect:
3636

3737
```js {5-9}
38-
3938
function Form() {
4039
const [firstName, setFirstName] = useState('Taylor');
4140
const [lastName, setLastName] = useState('Swift');

0 commit comments

Comments
 (0)