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

[FIX] Some react render issues #214

Merged
merged 7 commits into from
Apr 8, 2022
Merged

[FIX] Some react render issues #214

merged 7 commits into from
Apr 8, 2022

Conversation

kamikazebr
Copy link
Member

@kamikazebr kamikazebr commented Apr 8, 2022

What was done:

  • unsubscribe after unmount
  • keys props
  • hack fix to not load Dashboard component when in route /detail

Details

When realod some page like http://localhost:3000/#/detail?id=0xa7954D9085aC960bD489F24a7A60D0347a5a0Bd3

Quest details and wait for some time the request in background return but the components are unmounted.

And it leak memory.

The correct approach its not allow that components be loaded if not showed, but it fast fix for now.

Also added key props to render.


export const DEFAULT_PAGE = ENUM_PAGES.List; setted to undefined as default to avoid load Dashboard and switch to QuestDetail

@vercel
Copy link

vercel bot commented Apr 8, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/1hive/quests/DhHDRkGw84KvTCeJcNGodK8FQsip
✅ Preview: https://quests-git-fix-react-render-issues-1hive.vercel.app

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #214 (61ed55e) into main (95fe6f4) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #214   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           25        25           
  Branches         5         5           
=========================================
  Hits            25        25           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95fe6f4...61ed55e. Read the comment docs.

@kamikazebr kamikazebr requested a review from Corantin April 8, 2022 04:52
@kamikazebr kamikazebr self-assigned this Apr 8, 2022
@kamikazebr kamikazebr changed the title fix: unsubscribe after unmount and keys props FIX: Some react render issues Apr 8, 2022
@vercel vercel bot temporarily deployed to Preview April 8, 2022 14:35 Inactive
@kamikazebr kamikazebr changed the title FIX: Some react render issues [fix] Some react render issues Apr 8, 2022
@kamikazebr kamikazebr changed the title [fix] Some react render issues [FIX] Some react render issues Apr 8, 2022
packages/react-app/src/components/main-view.tsx Outdated Show resolved Hide resolved
packages/react-app/src/components/main-view.tsx Outdated Show resolved Hide resolved
packages/react-app/src/components/main-view.tsx Outdated Show resolved Hide resolved
packages/react-app/src/constants.ts Outdated Show resolved Hide resolved
packages/react-app/src/constants.ts Outdated Show resolved Hide resolved
packages/react-app/src/constants.ts Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview April 8, 2022 15:01 Inactive
@vercel vercel bot temporarily deployed to Preview April 8, 2022 15:11 Inactive
fix: mainview inside router
fix: fallback to QuestList
@vercel vercel bot temporarily deployed to Preview April 8, 2022 18:49 Inactive
@vercel vercel bot temporarily deployed to Preview April 8, 2022 19:12 Inactive
@kamikazebr kamikazebr requested a review from Corantin April 8, 2022 19:19
@vercel vercel bot temporarily deployed to Preview April 8, 2022 19:33 Inactive
@kamikazebr kamikazebr merged commit 96d8a31 into main Apr 8, 2022
@kamikazebr kamikazebr deleted the fix/react-render-issues branch April 8, 2022 19:50
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.

None yet

2 participants