-
Notifications
You must be signed in to change notification settings - Fork 0
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
Question: jbrowse2 state store #2
Comments
that's an interesting question. i could probably write a small essay on it. some notes
|
all that said, if you have any code samples you want me to look at let me know :) note that jbrowse isn't really able to take advantage of any of the 'server side rendering' aspects of nextjs |
thank you
The use case I'm trying to explore is aligning the output of a separate graphing component (or more) with info from the jb view (dynamically, without UI interaction) and thought the best way would be to populate a global store. So with mbox i could just set whatever shared data with What would be the effect of the jb2 component having an mbox-state object? will it be hierarchally integrated to a parent document's (the app's) mbox-state object? sorry if this is a dumb question |
with jbrowse, sometimes it is best to use the "observer" concept. here are two examples we have this one observes the "currently visible region" and just prints it out (as well as the "static blocks", which is just a rendering thing we do) live link https://jbrowse.org/storybook/lgv/main/?path=/story/source-code-for-examples--with-observe-visible-regions this one fetches all the features. it's a bit involved as it actually has to request the features in your code the secret is making your components wrapped in an "observer". so this component for example it is automatically re-rendered when the things that it accesses during rendering change, because it is wrapped in the mobx-react "observer" function (sometimes called "HOC" in react terms, it just wraps the function component) those examples sort of show how you can start to try to "react to what jbrowse is showing" i could try to anwer the other questions but it's possible the above links could be a start |
Good day Colin
Not sure the better way to ask you this but i reckon an issue on this repo is not the worst idea.
For my sins, I'm making a web app using nextjs that brings together data from APIs and passes them on to front end tools.
So i'm trying to think of how to manage state in react in a more generic way and i was thinking of using valtio.
I gave it a shot (with jbrowse) but i didn't get very far and not sure if it's even a good idea/feasible.
Would you have any experience or recommendations?
thank you,
alexie
The text was updated successfully, but these errors were encountered: