Re:Making Sense of React Server Components
by 5Qn8mNbc2FNCiVV on Friday September 08, 2023 @05:40AM
(#37431542)
Ignoring that sort mutates the initial array which is a bug in that example, you would just sort it in the function body. If the sort takes a lot of time or the array is big and you don't want to create garbage, you memoize it with useMemo.
[ Parent
| on HN ]
There are no comments on this comment yet.