<LocalStorage />
streamich opened this issue · comments
<LocalStorage>
<Entry key="foo">bar</Entry>
</LocalStorage>
Hmm interesting idea, but I'm not a huge fan of this very like, context
heavy API. How about something like this?
<LocalStorage key="myCoolKey" render={value =>
<span>The value of myCoolKey is <em>{value}</em></span>
} />
I will probably just move react-persist into this repo.
@rpowelll my snippet is a setter, yours is a getter basically. So, both could be used, don't really have an opinion on API, just would be nice to have something for localStorage
.
How about passing value
and onChange
functions to the child so you can connect it to an <input>
: <LocalStorage component="input" />
✨
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.
Closed due to inactivity. Holler if this is a mistake, and we'll re-open it.