Depends on D3585
Add logic for storing the log data in the database.
Differential D3586
[services] Backup - Send log - add store in database • karol on Mar 31 2022, 6:32 AM. Authored by Tags None Referenced Files
Details
Diff Detail
Event Timeline
Comment Actions Please make the summary more descriptive. Add the rest of SendLog functionality is a really general description of what is happening here. And a lot is happening here - is there a way to split this diff? (It's also confusing what do you mean by the rest - it doesn't sound like adding new todos should be a part of a diff which adds the rest).
A diff like that should definitely have a concrete test plan - it looks like at this point the logic should be easy to test Comment Actions Ok, I split the diff into multiple diffs. I hope it's now easier for you to review, I was trying to add a simple piece of code in every diff. The test plan you'd probably want to see is in D3651 Comment Actions Thanks! It's a lot better!
|
You don't need to use React.useMemo(...) here.
The useMemo() hook is helpful for maintaining referential equality so that objects will be considered "shallowly equal" (== in JS) and we can avoid re-renders. This is helpful for objects (including Map(), Set(), etc), arrays (which are objects), and functions (which are objects).
On the other hand, strings in JS are considered shallowly equal if they have the same contents, so we don't have to worry about re-renders if the "content" stays the same.
See below:
(In like C++, which you've been working w/ recently, std::strings can be allocated on the heap (unlike integers, booleans, etc) which may have been part of your reasoning that shallow equality would check reference instead of contents?)