After patching the new updates to the system, I had new tasks for this week which were mostly focused on fixing the unnecessary re-rendering. Fixing minor bugs across the system and editing some style with the assistance of a real device as opposed to emulator. and encountering new issues in the Decimal text box component.
I began debugging the code to fix the re-rendering bug by focusing on the Pick and Pack views, where it was primarily occurring. Initially, I attempted to create a render counter that counts each time a render occurred, which was really useful. It demonstrates that whenever the Data is requested from the API, it is rendered twice. Thanks to Mr. Peter’s explanation, I see now that it was due to an unnecessary application of useState; replacing it with useRef resolved the issue.
Afterwards, I fixed a few issues that were occurring in unpack view. I added the implementation of the error message for scanning the incorrect item and made sure it doesn’t interfere with the existing functionality. In addition, the Focus implementation in other views was not functioning while mounting, and also I managed to get that fixed.
As usual, no work week can pass without some Focus implementation challenges being encountered. After extensive experience with all sorts of errors encountered while implementing the focus in various ways. Nonetheless, I ran into another logic issue with the focus implementation, this time in the Decimal Text Box component.
To wind things up, I was successful this week in fixing a few minor problems, as well as one significant one, such as the render bug. Next, fix the focus bug in the Decimal component before beginning the testing tasks for the upcoming week.
