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

Injectable Store Tutorial #79

Closed
MukkundB opened this issue Jul 25, 2023 · 6 comments
Closed

Injectable Store Tutorial #79

MukkundB opened this issue Jul 25, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@MukkundB
Copy link

MukkundB commented Jul 25, 2023

Problem

I am trying to use jupyter-ui to build a new front-end client as opposed to the regular jupyter notebook.

In the process, I have found the need to use the redux store initialised in the jupyter-ui library. I see that there is a brief mention of an injectable store in the documentation. However, I cannot find any further information.

After digging through the code-base, I did find a, now-deprecated example with es-build. I still find quite some issues trying to inject my redux store.

### Ask

Is there any piece of documentation or an example that shows the usage of the prop injectableStore in the Jupyter component? Any direction or advise on this would be highly appreciated.

@MukkundB MukkundB added the documentation Improvements or additions to documentation label Jul 25, 2023
@echarles
Copy link
Member

Hi @MukkundB I will try to document the injectable store and create an example for that.

BTW We are considering to add Mobx to Redux (or replace it?). Could you give any thoughts on that, and maybe describe your use case to see if Mobx could do the job for you also?

@Bshara23
Copy link

Would like to also add a suggestion, zustand is very popular choice for state management, it could be relevant for a lot of people;
A simple example or doc on how to inject it would be very helpful

@echarles
Copy link
Member

@MukkundB I have added a section about state in the doc https://jupyter-ui.datalayer.tech/docs/state/redux which points to an example I have just pushed. The example show how to create you own state/action/reducer, enroll it in jupyter-react, and use it. Looking forward to your feedback.

@echarles
Copy link
Member

Would like to also add a suggestion, zustand is very popular choice for state management, it could be relevant for a lot of people;

@Bshara23 We can continue the discussion on redux/mobx/zustand on #50

@MukkundB
Copy link
Author

MukkundB commented Aug 1, 2023

@echarles Thanks a lot for adding an example in the repo.

As far as the state management, I do not necessarily have an opinion.

I am trying to build a alternative UI for Jupyter notebooks. Since there is a heavy dependence to JupyterUI, I believe I will be using the same state management library as the one used here to simplify things.

In any case, for the sake of building a simple prototype, using a redux store would do.

@echarles
Copy link
Member

echarles commented Aug 5, 2023

Closing as resolved. Please open a new issues if you need more help.

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

No branches or pull requests

3 participants