When to useMemo and useCallbackUsing React.useCallback may not always result in better performance as it can introduce additional work and memory overhead.
Reading a whole file at once (slurp)Loading an entire file into memory in C requires dynamic buffer growth and careful memory allocation handling due to the unpredictability of file size and potential large file sizes.