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

Reactive states transferring between users, when multiple users are concurrently accessing them. #867

Open
daoslies opened this issue Nov 20, 2024 · 0 comments

Comments

@daoslies
Copy link

daoslies commented Nov 20, 2024

We're building an app with solara that involves querying a database and presenting that information to the user.

We have noticed that in a number of places where we're using reactive states ( state = solara.reactive() ), there is an intermittent issue where users on different machines will be presented with the information from a different user's reactive state.

e.g. A user does a search, the result of that search is saved to a reactive state, a different user on a different machine will end up with that search result.

We noticed it initially when using reactive states to identify users with a username - someone would open up the app, and be presented with someone else's username.


With solara.use_state() you can enter a key='x' as an argument, and we do not get the issue with use_states because of that, as we can assign a unique key to each user. So there is definitely a unique state for each user and they don't end up interacting.

I think that if we could do that with solara.reactive() as well, that would enable us to resolve the issue. (but I'm not 100% sure how solara.reactive() works under the hood, so am unsure if this is possible.)


If you need any more details or there is anything else we can do to help resolve this issue please do let us know - we are quite deep into this project and this issue does not appear to be something we can easily resolve on our own. (except by changing everything to use_states, and that's not really ideal because of the limitations of use_states)

Fully holding out for the possibility that we are simply using solara.reactive() in an unexpected way, but we have been using solara for 6 months now and are fairly familiar with the way solara wants to be used.

Thankyou very much and all the best.

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

No branches or pull requests

1 participant