Comments (7)
I like it! Leave it up to the app developer whether or not they care :)
from use-local-storage-state.
Respect for the type of issue you have created. This is what I call a way to approach problems – with questions.
These aren't easy questions. Can you give me a few days to think about it and we can discuss them after that?
from use-local-storage-state.
I saw that type of thinking in your post: https://espen.codes/post/strictness-in-apis-or-why-hapi-rocks. Nice!
from use-local-storage-state.
const [value, setValue, isPersistent] = useLocalStorageState('key')
What do you think about such an API? The hook will return an additional boolean to let you know if the data is currently being persisted in localStorage or not?
from use-local-storage-state.
I am done with the implementation. Can you check it out and tell me what you think?
from use-local-storage-state.
This looks great!
from use-local-storage-state.
Perfect. I am closing this issue then. If you have more valuable feedback please don't hesitate to write it.
from use-local-storage-state.
Related Issues (20)
- Setter in useEffect dependencies array always changes HOT 5
- Does not respond to changes to localStorage made elsewhere in the application HOT 2
- Persist in localStorage, but do not upgrade React state HOT 5
- React 18 support (created by library author) HOT 8
- I have a problem using the use-local-storage-state HOT 7
- Hydration error with ssr:true using NextJS HOT 7
- need guidance for using sessionStorage also HOT 3
- Return isPossiblyHydrating HOT 4
- Usage Example contains "ssr: true", which does not appear to be a valid option HOT 1
- usage with reducer HOT 2
- Seems to be trying to fetch from local storage before window is defined in React/Next SSR environment HOT 6
- React 18: value only is available on 2nd render cycle HOT 13
- Latest version on npm is 17.3.0, rather than 18.2.0 HOT 3
- Could not find a declaration file for module 'use-local-storage-state'. HOT 4
- ✨ Make package ESM only
- block all cookies in safari breaks the hook HOT 9
- Next.js build error: targets must start with "./" HOT 2
- Migrating from `createLocalStorageStateHook` HOT 4
- Support for sessionStorage HOT 1
- Error: is not a function or its return value is not iterable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-local-storage-state.