Fixes a bug where initial URL parameters were not being loaded correctly.
Estimated review size: tiny, <5 minutes
I realized that certain view settings weren't being pulled correctly from the URL-- this was both because I was accidentally overwriting them (oops) but also because of a more complex issue with ImageViewerApp.
It turns out that the ImageViewerApp only uses passed props as initial values, and ignores all future updates to them. To fix this, I initialized the viewer args + settings as null in AppWrapper and block rendering of the ImageViewerApp until they are loaded for the first time. This way the args + settings are complete the first time they are passed into ImageViewerApp.
Testing
Clone the branch and start the dev server using npm run start.
Fixes a bug where initial URL parameters were not being loaded correctly.
Estimated review size: tiny, <5 minutes
I realized that certain view settings weren't being pulled correctly from the URL-- this was both because I was accidentally overwriting them (oops) but also because of a more complex issue with
ImageViewerApp
.It turns out that the
ImageViewerApp
only uses passed props as initial values, and ignores all future updates to them. To fix this, I initialized the viewer args + settings asnull
inAppWrapper
and block rendering of theImageViewerApp
until they are loaded for the first time. This way the args + settings are complete the first time they are passed intoImageViewerApp.
Testing
npm run start
.