You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
andupdateStreak
(orsaveStreak
). 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.
The text was updated successfully, but these errors were encountered: