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

Support remoteStorage #3

Open
jsjoeio opened this issue Jun 24, 2022 · 0 comments
Open

Support remoteStorage #3

jsjoeio opened this issue Jun 24, 2022 · 0 comments

Comments

@jsjoeio
Copy link
Owner

jsjoeio commented Jun 24, 2022

This library is great for building POCs but in the real world, data needs to persist. localStorage isn't sufficient.

I'd like to support saving the streak to a database.

I'm exploring some ideas but one idea is to allow the user to provide a third argument which has two functions - getStreak and updateStreak (or saveStreak). We would call these functions for you. I believe this is an example of inversion of control.

Rather making an assumption of how your database is set up or how you want us to connect to it, instead, we just call your callback for you based on our streak logic.

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