Skip to content

Commit

Permalink
Update index.mdx, changing 'object' to 'value' (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjvanhall committed Apr 24, 2024
1 parent c5e26ec commit 2089ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/blog/understanding-reacts-key-prop/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function Counter() {

function CounterParent() {
// using useReducer this way basically ensures that any time you call
// setCounterKey, the `counterKey` is set to a new object which will
// setCounterKey, the `counterKey` is set to a new value which will
// make the `key` different resulting in React unmounting the previous
// component and mounting a new one.
const [counterKey, setCounterKey] = React.useReducer(c => c + 1, 0)
Expand Down

0 comments on commit 2089ff4

Please sign in to comment.