Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fikse uendelig loop i useeffekten til holdeplass-view #454

Merged
merged 2 commits into from
Sep 3, 2021
Merged

Conversation

Collatty
Copy link
Contributor

@Collatty Collatty commented Sep 2, 2021

Slik jeg har skjønt det fører den if-en fra 118 til 123 til at stopPlacesWithDepartures ble forskjellig på hver render. Det førte til at loopen ble uendelig om ikke ifen 152 til 154 kicket inn og hindret at noe state ble satt i useeffecten. Endret derfor til å kjøre filtreringen inni useeffecten. Jeg gjorde noen andre refactoringer her som jeg synes ga mening. Åpen for innspill om det er noe en er uenig i.

@Collatty Collatty requested a review from a team September 2, 2021 14:49
Copy link
Contributor

@bendiksk bendiksk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bra jobba, dette blir viktig å få inn. Klarte ikke å fremprovosere bug'en nå med kort testing 🚀

src/dashboards/BusStop/index.tsx Show resolved Hide resolved
@Collatty Collatty merged commit 29d18f3 into master Sep 3, 2021
@Collatty Collatty deleted the bug/inf-loop branch September 3, 2021 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants