Conversation
|
@rushatgabhane 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] |
| if (isInitialRender.current) { | ||
| Timing.start(CONST.TIMING.HOMEPAGE_INITIAL_RENDER); | ||
|
|
||
| const currentURL = getCurrentUrl(); |
There was a problem hiding this comment.
I'm curious if this logic can be moved inside the useEffect below. The useEffect renders only on component mount. That is what we want, right?
There was a problem hiding this comment.
useEffect actually runs after the first render. Similarly, useLayoutEffect runs after the first render but before the first paint.
If you want to run some logic during the first render, this useRef approach seems to be the way to do it.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-18.at.04.37.01.movAndroid: mWeb ChromeiOS: NativeScreen.Recording.2024-07-18.at.04.31.50.moviOS: mWeb SafariScreen.Recording.2024-07-18.at.04.33.23.movMacOS: Chrome / SafariScreen.Recording.2024-07-18.at.04.18.12.movMacOS: DesktopScreen.Recording.2024-07-18.at.04.34.53.mov |
| Timing.start(CONST.TIMING.HOMEPAGE_INITIAL_RENDER); | ||
|
|
||
| const currentURL = getCurrentUrl(); | ||
| if (currentURL) { |
There was a problem hiding this comment.
Out of curiosity, is there a known case where currentURL would evaluate to false?
There was a problem hiding this comment.
on mobile it will be '', so falsy
|
✋ 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/rlinoz in version: 9.0.10-2 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.0.10-3 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.10-7 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
Details
Sets the initial reportID in AuthScreens via
initialParams. Only calculates the initial reportID on the first render.Fixed Issues
$ #45486
Tests / QA Steps
/a/hello<in the RHPOffline tests
n/a
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
web.mov
MacOS: Desktop