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

Replace Redux with Zustand` #50

Closed
6 tasks done
echarles opened this issue May 1, 2023 · 5 comments · Fixed by #232
Closed
6 tasks done

Replace Redux with Zustand` #50

echarles opened this issue May 1, 2023 · 5 comments · Fixed by #232
Assignees
Labels
feature New feature or request

Comments

@echarles
Copy link
Member

echarles commented May 1, 2023

Components

  • Cell
  • Console
  • Notebook
  • Output
  • Terminal
  • Jupyter

Zustand vs Mobx

As initial step, we could add Mobx and/or Zustand to Redux instead of removing completely Redux. See also this comment by @@MukkundB

Important criteria is the ease of integration with Rx.js (very useful and sometimes needed for JupyterLab cases) and Y.js.

Nowadays Zustand seems to have more contribution and downloads.

Mobx

Screenshot 2023-07-30 at 20 05 34 Screenshot 2023-07-30 at 20 07 46

Zustand

Screenshot 2023-07-30 at 20 05 44 Screenshot 2023-07-30 at 20 07 16
@echarles echarles self-assigned this May 16, 2023
@echarles echarles added the feature New feature or request label May 16, 2023
@echarles echarles changed the title Replace Redux by Mobx Add/Replace Redux with Mobx and/or Zustand Jul 30, 2023
@echarles echarles changed the title Add/Replace Redux with Mobx and/or Zustand Add/Replace Redux with Mobx and/or Zustand` Jul 30, 2023
@echarles echarles pinned this issue Nov 24, 2023
@echarles
Copy link
Member Author

I had a chat yesterday with @adrianlemess and looks like Zustand would be a great addition aside Redux, ensuring also to not expose the state library to the library use.

We could deprecate Redux later to give some migration time.

I have prepared the work with this commit 90bcb63

@echarles echarles changed the title Add/Replace Redux with Mobx and/or Zustand` Add/Replace Redux with Zustand` May 16, 2024
@echarles echarles changed the title Add/Replace Redux with Zustand` Replace Redux with Zustand` May 16, 2024
@echarles
Copy link
Member Author

Let's go for Zustand.
In the long run, the Redux context should disappear.

@echarles
Copy link
Member Author

In the long run, the Redux context should disappear.

Let's go faster to remove Redux.

I think @BrandonEscamilla is using reducer injection, is that something you really need or would a Zustand equivalent would work?

@BrandonEscamilla
Copy link
Contributor

I just saw you closed this one, but yes a zustand equivalent would work. Thanks.

@echarles
Copy link
Member Author

I just saw you closed this one, but yes a zustand equivalent would work. Thanks.

Sure, zustand is way more flexible. I will prepare an example for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants