Closed FarazPatankar closed 1 year ago
I think I figured it out. Basically went from:
export const useParticles = createLocalStorageStateHook(
"@railway/particles",
false,
);
const [showParticles, setShowParticles] = useParticles();
to:
export const useParticles = () =>
useLocalStorageState("@railway/particles", {
defaultValue: false,
});
// Usage remains the same
const [showParticles, setShowParticles] = useParticles();
Leaving it open so you can correct me if I am wrong. 😄
Hey, good to hear you are upgrading.
Yes, you nailed it. That's precisely the correct usage of the new API.
Yeah, I haven't mentioned the upgrade steps. Sorry about that. Still learning to do open-source.
Let me know if you stumble on anything else so I can help.
Everything else seems fine, we use the lib pretty heavily, great work! 💚
Hey, so I am seeing a few usages of
createLocalStorageStateHook
in our codebase and I noticed the latest version does not have this function?I also went through the releases and didn't see a mention of it being removed as a breaking change. Could I get any pointers on how to migrate the existing usages?