Skip to content

Commit 9b3c3f4

Browse files
authored
remove outdated recommendation
1 parent 449cb26 commit 9b3c3f4

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

content/docs/hooks-faq.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,6 @@ Note that you can still choose whether to pass the application *state* down as p
914914
>Note
915915
>
916916
>We recommend to [pass `dispatch` down in context](#how-to-avoid-passing-callbacks-down) rather than individual callbacks in props. The approach below is only mentioned here for completeness and as an escape hatch.
917-
>
918-
>Also note that this pattern might cause problems in the [concurrent mode](/blog/2018/03/27/update-on-async-rendering.html). We plan to provide more ergonomic alternatives in the future, but the safest solution right now is to always invalidate the callback if some value it depends on changes.
919917
920918
In some rare cases you might need to memoize a callback with [`useCallback`](/docs/hooks-reference.html#usecallback) but the memoization doesn't work very well because the inner function has to be re-created too often. If the function you're memoizing is an event handler and isn't used during rendering, you can use [ref as an instance variable](#is-there-something-like-instance-variables), and save the last committed value into it manually:
921919

0 commit comments

Comments
 (0)