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

Remix: fix loader data not updating #4916

Merged
merged 4 commits into from
Feb 16, 2024
Merged

Remix: fix loader data not updating #4916

merged 4 commits into from
Feb 16, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Feb 16, 2024

Problem:

When the loader data changes in the projects page, because for example of fetchers submitting requests, the projects are not updated on the page.

Fix:

We need a useEffect on the loader data to refresh the projects, so this PR adds that.

This PR turned into a more consistent refactor of the projects page code, but it achieves the same goal while also getting rid of useEffects and making the code much more modular.

  1. Split the code into separate components for the different pieces of the UI
  2. Put the search query into the zustand store
  3. Move the dark mode useEffect stuff into its own useIsDarkMode hook

Copy link
Contributor

github-actions bot commented Feb 16, 2024

Try me

Copy link

relativeci bot commented Feb 16, 2024

Job #10474: Bundle Size — 62.16MiB (~-0.01%).

2a8140f(current) vs d299c8d master#10465(baseline)

Warning

Bundle contains 58 duplicate packages – View duplicate packages

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
Job #10474
     Baseline
Job #10465
Regression  Initial JS 35.2MiB(~+0.01%) 35.2MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 20.37% 0%
No change  Chunks 28 28
No change  Assets 32 32
No change  Modules 4360 4360
No change  Duplicate Modules 494 494
No change  Duplicate Code 30.8% 30.8%
No change  Packages 467 467
No change  Duplicate Packages 58 58
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
Job #10474
     Baseline
Job #10465
Regression  JS 62.15MiB (~+0.01%) 62.15MiB
Improvement  HTML 11.37KiB (-0.32%) 11.41KiB

View job #10474 reportView fix/remix-loader-effect branch activityView project dashboard

Copy link
Contributor

github-actions bot commented Feb 16, 2024

Performance test results:
(Chart1)
(Chart2)

@ruggi ruggi merged commit 9cdc033 into master Feb 16, 2024
16 checks passed
@ruggi ruggi deleted the fix/remix-loader-effect branch February 16, 2024 17:20
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.

3 participants