[No QA] add derived values guidelines to readme#59650
[No QA] add derived values guidelines to readme#59650mountiny merged 8 commits intoExpensify:mainfrom
Conversation
|
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
mountiny
left a comment
There was a problem hiding this comment.
Great, that in addition with the existing instructions makes it quite clear on how and when to use it
README.md
Outdated
|
|
||
| 2. **High-Frequency Updates** | ||
| - The dependencies change very frequently | ||
| - The derived value would trigger too many re-renders |
There was a problem hiding this comment.
do you mind explaining how is this different from the dependencies on their own changing too frequently? wouldn't that be causing unavoidable re-renders? I'm not sure I follow why a derived value is any different. e.g. suppose we have a few components that use dependency A & B and we want them to use instead a computed value C derived from A&B. How is re-renders coming from C worse than re-renders coming from A&B without a derived value?
There was a problem hiding this comment.
Yeah you are right, it's not different at all, let's remove it
There was a problem hiding this comment.
I think this needs to be removed too no?
**High-Frequency Updates**
- The dependencies change very frequently
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
Looks like we have conflicts. Also @roryabraham would you like to take a look? |
|
@TMisiukiewicz can you please resolve the conflicts? |
c5302a0
|
@mountiny done 👍 |
mountiny
left a comment
There was a problem hiding this comment.
We got couple of approvals so going to go ahead and merge this. Rory, feel free to leave a review if you want later
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.1.26-10 🚀
|
Explanation of Change
Adding guidelines on how to properly use derived values
Fixed Issues
$ #59350
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop