refactor: avoid synchronous state updates in useEffect#1408
Merged
lusergit merged 2 commits intoedgehog-device-manager:mainfrom May 4, 2026
Merged
refactor: avoid synchronous state updates in useEffect#1408lusergit merged 2 commits intoedgehog-device-manager:mainfrom
lusergit merged 2 commits intoedgehog-device-manager:mainfrom
Conversation
| datasource | package | from | to | | ---------- | -------------------------------- | ------- | ------- | | npm | @formatjs/cli | 6.14.1 | 6.14.4 | | npm | @fortawesome/react-fontawesome | 3.3.0 | 3.3.1 | | npm | @noble/hashes | 2.2.0 | 2.2.0 | | npm | @typescript-eslint/eslint-plugin | 8.58.1 | 8.59.1 | | npm | @typescript-eslint/parser | 8.58.1 | 8.59.1 | | npm | @vitest/coverage-v8 | 4.1.4 | 4.1.5 | | npm | apexcharts | 5.10.6 | 5.10.6 | | npm | baseline-browser-mapping | 2.10.18 | 2.10.24 | | npm | eslint-plugin-react-hooks | 7.0.1 | 7.1.1 | | npm | jsdom | 29.0.2 | 29.1.1 | | npm | lucide-react | 1.8.0 | 1.14.0 | | npm | prettier | 3.8.2 | 3.8.3 | | npm | react-hook-form | 7.72.1 | 7.74.0 | | npm | react-router-dom | 7.14.0 | 7.14.2 | | npm | shadcn | 4.2.0 | 4.6.0 | | npm | vitest | 4.1.4 | 4.1.5 | | npm | zod | 4.3.6 | 4.4.1 | Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
dbf3a73 to
63c3149
Compare
Fixes a cascading render warning caused by calling `handleLogin` synchronously inside a mounting effect. Changes: - Decoupled the API login logic from the manual UI loading trigger. - Initialized `isLoggingIn` state based on URL parameters to prevent an immediate rerender on mount. - Extracted `performLogin` to handle the side effect without triggering synchronous state updates. Signed-off-by: Jasmina <jasmina.piric@secomind.com>
63c3149 to
0871934
Compare
OmarBrbutovic
approved these changes
May 4, 2026
lusergit
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Fixes a cascading render warning caused by calling
handleLoginsynchronously inside a mounting effect.Changes:
isLoggingInstate based on URL parameters to prevent an immediate rerender on mount.performLoginto handle the side effect without triggering synchronous state updates.Additional documentation e.g. usage docs, diagrams, reviewer notes, etc.:
Thanks for sending a pull request! If this is your first time, here are some tips for you:
When fixing existing issues, use github's syntax to link your pull request to it
We also have a syntax to signal dependencies to other open pull requests
In case of stacked PRs, you may add the PR number in the last commit's title instead: