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

First-class way to use local storage with State #1677

Closed
gmurthy-slanglabs opened this issue Aug 25, 2023 · 1 comment
Closed

First-class way to use local storage with State #1677

gmurthy-slanglabs opened this issue Aug 25, 2023 · 1 comment

Comments

@gmurthy-slanglabs
Copy link

Hello, thanks for the project!

This not really a bug report, but more of a request for information.

We would like to store some data that is returned by the back-end into local storage. But there doesn't seem to be a first-class way to do this as far as I can tell.

All of the examples show that rx.set_local_storage() being called directly by local event handlers like this:

on_click=rx.set_local_storage("key", "value")`

What we're interested in is something like this:

on_click=State.call_backend_api, # works fine
# write the response to local storage, not sure how?

Can you please give me some pointers? Thanks!

@Lendemor
Copy link
Collaborator

I think this PR #1629 by @masenf will cover what you want, it should be released relatively soon.

Once it is, let us know any feedback you have about it.

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

2 participants