xunhuang / covid-19

MIT License
17 stars 16 forks source link

Adding a useStickyState hook, which saves state as cookie #111

Closed tumbleshack closed 4 years ago

tumbleshack commented 4 years ago

Question: should all the graphs share the same cookie for the showPastDays param?

I think not, since it would lead to an odd behavior whereby sliding one slider would result in another slider being in a different position upon component re-mount.

That said, I think it's worth considering because this would mean default behavior has users comparing apples-to-apples.

Will close #109

xunhuang commented 4 years ago

maybe one per graph type(/class)?

tumbleshack commented 4 years ago

Cool, that’s how it’s currently working. I’ll leave it as is

xunhuang commented 4 years ago

awesome! thank you.