File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
content/blog/usememo-and-usecallback Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ function Blub() {
291291}
292292` ` `
293293
294- The reason this is problematic is because ` useEffect ` is going to do a
294+ The reason this is problematic is ` useEffect ` is going to do a
295295referential equality check on ` options ` between every render, and thanks to the
296296way JavaScript works, ` options ` will be new every time so when React tests
297297whether ` options ` changed between renders it'll always evaluate to ` true ` ,
@@ -486,7 +486,7 @@ function RenderPrimes({ iterations, multiplier }) {
486486}
487487` ` `
488488
489- The reason this works is because even though you're defining the function to
489+ The reason this works is even though you're defining the function to
490490calculate the primes on every render (which is VERY fast), React is only calling
491491that function when the value is needed. On top of that React also stores
492492previous values given the inputs and will return the previous value given the
You can’t perform that action at this time.
0 commit comments