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: state management #4904

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Remix: state management #4904

merged 2 commits into from
Feb 15, 2024

Conversation

ruggi
Copy link
Contributor

@ruggi ruggi commented Feb 15, 2024

Fix #4903

Problem:

The Remix app needs a simple state management solution so we don't have to pass around variables through components.

Fix:

  • Add zustand
  • Init a simple store with a field and a setter for the current Category
  • Use the store data where applicable

Copy link
Contributor

github-actions bot commented Feb 15, 2024

Try me

Copy link

relativeci bot commented Feb 15, 2024

Job #10449: Bundle Size — 61.88MiB (+0.22%).

3215206(current) vs d299c8d master#10444(baseline)

Important

Bundle introduced 3 duplicate packages – View changed duplicate packages

Warning

Bundle introduced 11 new packages: antd, omit.js, rc-pagination and 8 more – View changed packages

Bundle metrics  Change 6 changes Regression 3 regressions Improvement 1 improvement
                 Current
Job #10449
     Baseline
Job #10444
Regression  Initial JS 34.93MiB(+0.39%) 34.79MiB
No change  Initial CSS 0B 0B
Change  Cache Invalidation 30.9% 20.46%
No change  Chunks 28 28
No change  Assets 32 32
Change  Modules 4361(+1.56%) 4294
No change  Duplicate Modules 493 493
Improvement  Duplicate Code 30.94%(-0.19%) 31%
Regression  Packages 469(+3.08%) 455
Regression  Duplicate Packages 60(+5.26%) 57
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
Job #10449
     Baseline
Job #10444
Regression  JS 61.87MiB (+0.22%) 61.73MiB
Improvement  HTML 11.37KiB (-0.32%) 11.41KiB

View job #10449 reportView feat/remix-zustand branch activityView project dashboard

Copy link
Contributor

Performance test results:
(Chart1)
(Chart2)


export const useStore = create<Store>()(
devtools(
persist(
Copy link
Contributor

Choose a reason for hiding this comment

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

ooh, fancy!

@ruggi ruggi merged commit a53f620 into master Feb 15, 2024
19 checks passed
@ruggi ruggi deleted the feat/remix-zustand branch February 15, 2024 11:00
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.

Add state management to Remix app
3 participants