hooks
hooks copied to clipboard
useCookieState: Missing option types
it looks like Option only has defaultValue.
React: 18.2.0 Typescript: 5.3.3
const [_, setToken] = useCookieState("token", {
defaultValue: "",
secure:true // Error: Object literal may only specify known properties, and 'secure' does not exist in type 'Options'.ts(2353)
});
also setToken.newOptions is not typed
I have no problem here, please provide an example. @Snazzie
Hello @Snazzie. Please provide a online reproduction by forking this link https://codesandbox.io/s/ok2fe or a minimal GitHub repository. Issues labeled by Need Reproduce
will be closed if no activities in 3 days.
你好 @Snazzie, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。3 天内未跟进此 issue 将会被自动关闭。