Browse Source

Fix comma position (#4897)

Fix comma position at line 219 , in phrase When you need to "change things,"
main
Mikhail Konin 2 years ago
committed by GitHub
parent
commit
5fed75dac5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      beta/src/pages/learn/keeping-components-pure.md

4
beta/src/pages/learn/keeping-components-pure.md

@ -216,7 +216,7 @@ Every new React feature we're building takes advantage of purity. From data fetc
* **Same inputs, same output.** Given the same inputs, a component should always return the same JSX.
* Rendering can happen at any time, so components should not depend on each others' rendering sequence.
* You should not mutate any of the inputs that your components use for rendering. That includes props, state, and context. To update the screen, ["set" state](reacting-to-input-with-state) instead of mutating preexisting objects.
* Strive to express your component's logic in the JSX you return. When you need to "change things," you'll usually want to do it in an event handler. As a last resort, you can `useEffect`.
* Strive to express your component's logic in the JSX you return. When you need to "change things", you'll usually want to do it in an event handler. As a last resort, you can `useEffect`.
* Writing pure functions takes a bit of practice, but it unlocks the power of React's paradigm.
</Recap>
@ -857,4 +857,4 @@ It is useful to remember which operations on arrays mutate them, and which don't
</Solution>
</Challenges>
</Challenges>

Loading…
Cancel
Save